[英]How to tell which git branch is checked out?
我在github上有一个项目,我只是承诺并推动它。 但是,我的更改不会显示在github上。
我想我没有检查出master
分支。 这意味着我不知道我目前正在工作的分支机构的名称。老实说,我真的不知道我在哪里提交了我的更改。
如何找出我目前检查的分支? 如何将这些更改合并到master
? 我刚刚做了什么?
当我承诺时,它说:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
然后我做了一个git push
,我不知道那个被推到哪里。
$ git log
commit dcb85bcfafa18d9dfe9f12659e7ba0e2662ca45e
Author: ...
Date: Wed May 18 22:41:57 2011 -0400
Fix for new vm website layout, add CREDITS
我的代码在哪里? 我怎样才能将它合并到master中?
git branch
git branch --contains dcb85b
gitk --all --date-order
要将它合并到master中,你可以使用git merge dcb85b
或git cherry-pick dcb85b
或任意数量的命令之一。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.