Skip to content
Discussion options

You must be logged in to vote

Whenever the remote contains commits that are not present locally, pulling is the right thing to do, not force push, I believe.

I would only agree with this if those remote commits are ones that you never had locally; e.g. they were pushed by a coworker. If you did have them locally at one point, force-pushing is a very normal thing to do, e.g. after rebasing.

To guard against force-pushing when there are commits that you never saw, use git config --global push.useForceIfIncludes.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by pimvanderheijden
Comment options

You must be logged in to vote
2 replies
@stefanhaller
Comment options

@pimvanderheijden
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