开发者

How can I make git status be quiet when updating to a certain changeset?

Let's say I commit 5 changesets, and I want to update to the 3rd:

git checkout 3rd sha .

After I do the checkout, I'm in the exact state I was at the 3rd revision. So, I want to make it so that if I run git status it will only show me things that changed in respect to that changeset. I don't want git status to use HEAD as it's refer开发者_如何学Pythonence. I would like behavious similar to mercurial's. Is this possible? Is this possible without checking out that revision to a new branch?


Do a git reset <3rd sha> and do git diff, git status etc.

To go back to original head, use git reset HEAD@{1} or git reflog and find the appropriate sha and reset to it

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜