I have both local changes and remote changes.
Someone told me I must do push first, then pull. Any reason behind this?
That person is wrong: the right model is pull-before-you-push
and not the reverse.
When you pull
, git
will fetch commits on origin
and will try to fast-forward
your local commits on top of them, doing the merge. After that you can push
in this way you will not generate conflicts with other updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With