I have these 2 branches on my remote GitHub repository:
- development
- master
How do I merge development into master on the remote repository? I’ve tried
git merge development
and
git merge origin
but it says the repo is up to date so I’m doing it wrong because github says development is 12 commits ahead of master.
Update
Thanks for the follow ups – here’s some more info, I did a push to the remote repository with
git push origin
and my changes have been committed. If I do a clone in another folder I see all the changes there if I checkout the development branch.
git branch -av
development 8265e30 - etc
hotfix-t4 8342e44 - etc
*master 0041bod - Initial Commit
remotes/origin/HEAD -> origin/master
remotes/origin/development 8265e30 - etc
remotes/origin/experimental 22cd3ef test1
remotes/origin/hotfix-t4 8342e44 test
remotes/origin/master 0041bod Initial commit
The behaviour of
git pushorgit push origin(i.e. when you don’t also specify a refspec as the last parameter) is rather surprising – by default it pushes each branch to one of the same name so long as a branch with that name exists both locally and remotely. (This default can be changed with thepush.defaultconfig option.)So, to be sure that you have correctly pushed a particular branch to the same name in the remote
origin, it’s a good idea to always use this form:… which is equivalent to
git push origin <branch-name>:<branch-name>.So, in full, to make sure that you have merged
developmenttomasterlocally, and then pushedmasterto GitHub, do exactly the following: