How can I find the location of origin/master in git, and how do I change it?

前端 未结 13 528
悲哀的现实
悲哀的现实 2020-12-02 03:33

I\'m a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-yo

13条回答
  •  旧巷少年郎
    2020-12-02 04:24

    I had a problem that was similar to this where my working directory was ahead of origin by X commits but the git pull was resulting in Everything up-to-date. I did manage to fix it by following this advice. I'm posting this here in case it helps someone else with a similar problem.

    The basic fix is as follows:

    $ git push {remote} {localbranch}:{remotebranch}
    

    Where the words in brackets should be replaced by your remote name, your local branch name and your remote branch name. e.g.

    $ git push origin master:master
    

提交回复
热议问题