English 中文(简体)
4. 驻外办事处
原标题:Git view another branch
  • 时间:2012-01-13 04:39:01
  •  标签:
  • git

我从master 中抽出一个新的分支栏目,以便为我的备份创造新的特征,但我这样做时打破了另一个特征。

我不想删除<条码>my_branch上的改动,但希望回头看一下破损的原始状况。 然后,我要再次回到我的肩上。

我应如何这样做?

Thank you.

最佳回答

1) You can git stash and go back to master see and come back and git stash pop

2) You can do git show master:path/to/file and see the file / directory ( this if you want to see the contents )

3) 你们总是能够作出承诺、改变分支和退缩,以及<编码>git reset HEAD~。

问题回答
  • First make sure you don t have any outstanding changes in my_branch by using either git commit or git stash.

  • 然后使用<代码>git 支票out Master,转而查看master/code>中的你的代码状况。

  • 当你做时,请使用<代码>git 核对我_branch 回到贵处。

  • 如果你在第一步中阻碍您的工作变化,你现在可以使用<条码> st/条码>重新应用。





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签