Push
Push is the opposite to pull / fetch. It sends the changes to the remote.
One thing to notice is that the remote typically don't deal with conflicts.
Any conflicts should be resolved locally, before being pushed to the remote.
You can ONLY push farst-forward merges.
Do NOT alter the branch history from the remote. Otherwise, you won't be able to push it. For example, if your remote has commits A-B-C and your local ends up as A-D-C, you can't push it as it's not a fast-forward merge.
Also, don't change the commit history of the remote. Otherwise others can't push.
The typical way to push is
Pull first. This ensures you have the latest progress from your colleagues.
Make commits and extend the commit history.
Push.
Last updated