Auto push feature
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
Hooks aren't synchronized between computers
Neither are repo-local config files. (Unless we introduce versioned config files, which I don't see happening any time soon; see https://github.com/jesseduffield/lazygit/issues/3293#issuecomment-2295179188.)
Setting up hooks requires manual configuration for each clone of the repository
So does a repo-local config file.
No visual indication in the Lazygit UI that auto-push is enabled
It looks like this would be the only advantage then; honestly, I wonder if it's worth the effort just for that.