jesseduffield / jesseduffield/lazygit

Auto push feature

Open
#4,647 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.