Skip to content

How can I enable fetch before push but disable auto fetch? #3774

Answered by mark2185
linsui asked this question in Q&A
Discussion options

You must be logged in to vote

You could add a core.hooksPath and have a global hook there (docs).

Second option would be to create a custom command within lazygit and map it to P (push), something like git fetch && git push.

Third option would be to create a habit of fetching/pulling before pushing since it's something one should use even when not using any git wrappers.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@linsui
Comment options

@mark2185
Comment options

Answer selected by linsui
@linsui
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants