Reputation: 18774
Say that I have a master branch and development branch which I am working on. I want to merge development with master branch.
Are there any differences between pusing development branch to master or switch to master branch then merging development branch into master branch ?
Upvotes: 2
Views: 9478
Reputation: 1864
Merging is a local operation, while pushing operates on a remote repository. These two things are unrelated in a Git context.
In order to merge two branches, you check out either one and then run git merge <other>
. In your case, you probably want to merge development
into master
, so you will do
git checkout master
git merge development
After that, you might want to perform a git push
operation in order to update the remote repository, but that is unrelated to the merge operation.
Upvotes: 5
Reputation: 9104
This Article might help here: http://longair.net/blog/2009/04/16/git-fetch-and-merge/
It the comparison between git pull vs git fetch then merge, which is similar to this scenario.
Upvotes: -1