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

前端 未结 13 530
悲哀的现实
悲哀的现实 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:04

    I thought my laptop was the origin…

    That’s kind of nonsensical: origin refers to the default remote repository – the one you usually fetch/pull other people’s changes from.

    How can I:

    1. git remote -v will show you what origin is; origin/master is your “bookmark” for the last known state of the master branch of the origin repository, and your own master is a tracking branch for origin/master. This is all as it should be.

    2. You don’t. At least it makes no sense for a repository to be the default remote repository for itself.

    3. It isn’t. It’s merely telling you that you have made so-and-so many commits locally which aren’t in the remote repository (according to the last known state of that repository).

提交回复
热议问题