Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between push branch and merge to master then push?

Tags:

People also ask

What is the difference between push and merge?

Whats the difference between push , commit & fetch ,merge. Git commit basically “records changes to the local repository” while git push “updates remote refs along with associated objects”.

Is git push the same as merge?

Git push will copy all commits from current branch that are missing in destination branch (a38de, 893cf, 756ae) and move the pointers both in destination branch and remote tracking branch to the same commit in local branch. Note that it will not perform any merge.

Should I push before merge?

Always Pull Before a Push Doing so will ensure that your local copy is in sync with the remote repository. Remember, other people have been pushing to the remote copy, and if you push before syncing up, you could end up with multiple heads or merge conflicts when you push.


One way:

git checkout myBranch git push origin myBranch:master 

Another way:

git checkout master git merge myBranch git push 

What is difference between these two?