开发者

git branch issue

I have a local system where i work (windows) and commit changes and a production server (ubuntu) where i pull the changes.

I create a new branch when i have major changes on the code. Last branch is 0.9.1

开发者_Go百科I pull on the server with:

sudo git pull git@git.myrepo.com:myproject.git 0.9.1

however, i wanted to roll back to a previous branch (0.9) and can only see this when i do a branch -a:

* master
  remotes/origin/0.1
  remotes/origin/0.2
  remotes/origin/0.3
  remotes/origin/0.4
  remotes/origin/0.5
  remotes/origin/0.6
  remotes/origin/0.7
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

on my local machine i use git gui and I can see the branch 0.9 (and 0.8 and 0.9.1) How come i cannot see it on the server?

Thanks


You should checkout a local branch try this instead of a git pull:

git checkout -b 0.9.1

After that, do your work then push the changes to the remote:

git push origin 0.9.1

Off topic, you should consider tags instead of branches for major releases.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜