Description
Is your feature request related to a problem? Please describe.
Currently, there is no built-in way to automatically push commits to the remote repository after they are made through Lazygit. For certain repositories, like GitOps repos, where I frequently need to share changes with team members, I have to manually push after each commit, which adds an extra step to my workflow, and is prone to human errors of forgetting to press that "P" after commit.
Describe the solution you'd like
I would like Lazygit to have a repository-specific configuration option that enables automatic pushing after a commit is made. This would be similar to setting up a post-commit Git hook, but managed through Lazygit's configuration system.
Key aspects of this feature:
Option to enable/disable auto-push per repository
Configurable through Lazygit's config file
Visual indicator when auto-push is enabled for a repository
Ability to handle push failures gracefully (e.g., network issues, conflicts)
Describe alternatives you've considered
Currently, I'm using a Git post-commit hook to achieve this functionality, but this approach has limitations:
Hooks aren't synchronized between computers
Setting up hooks requires manual configuration for each clone of the repository
No visual indication in the Lazygit UI that auto-push is enabled
Additional context
This feature would be particularly useful for:
Small teams working on shared repositories
Solo developers working across multiple machines
Projects where continuous integration depends on frequent pushes
Workflows where changes need to be immediately available to other team members