“然”;git结帐负责人;关于分支机构B,现在是;git checkout B";把我带到老年人那里

“然”;git结帐负责人;关于分支机构B,现在是;git checkout B";把我带到老年人那里,git,git-detached-head,Git,Git Detached Head,我正在对分支上的代码进行一些补充。遇到bug后,我运行了以下命令: git checkout HEAD^^ 为了回到(大概)工作状态,以确保它确实工作。但是,现在每当我跑步时: git checkout atomic_boron 它把我带到了老地方。但是,git日志显示更新的提交仍然存在。如果我签出最近的承诺,它会让我陷入一种超然的状态,我似乎无法摆脱。在头部分离状态下,我试着跑步: git checkout -b wtf_detached_head git checkout atomic_

我正在对分支上的代码进行一些补充。遇到bug后,我运行了以下命令:

git checkout HEAD^^
为了回到(大概)工作状态,以确保它确实工作。但是,现在每当我跑步时:

git checkout atomic_boron
它把我带到了老地方。但是,git日志显示更新的提交仍然存在。如果我签出最近的承诺,它会让我陷入一种超然的状态,我似乎无法摆脱。在头部分离状态下,我试着跑步:

git checkout -b wtf_detached_head
git checkout atomic_boron
git merge wtf_detached_head
但是合并声明分支之间没有区别

tl;dr:我想做的就是将头部重新连接到原子上最近的提交,但是git坚持要在分离的头部状态下签出提交

以下是reflog的输出(如果有帮助):

b66c7bd HEAD@{0}: checkout: moving from b66c7bd68f926cf9bb8b0b531252e91599d086ca to atomic_boron
b66c7bd HEAD@{1}: checkout: moving from atomic_boron to b66c7bd68f926cf9bb8b0b531252e91599d086ca
b66c7bd HEAD@{2}: checkout: moving from wtf_detached_head to atomic_boron
b66c7bd HEAD@{3}: checkout: moving from atomic_boron to wtf_detached_head
b66c7bd HEAD@{4}: checkout: moving from wtf_detached_head to atomic_boron
b66c7bd HEAD@{5}: checkout: moving from b66c7bd68f926cf9bb8b0b531252e91599d086ca to wtf_detached_head
b66c7bd HEAD@{6}: checkout: moving from atomic_boron to b66c7bd68f926cf9bb8b0b531252e91599d086ca
b66c7bd HEAD@{7}: checkout: moving from b66c7bd68f926cf9bb8b0b531252e91599d086ca to atomic_boron
b66c7bd HEAD@{8}: checkout: moving from atomic_boron to b66c7bd68f926cf9bb8b0b531252e91599d086ca
b66c7bd HEAD@{9}: checkout: moving from master to atomic_boron
f99923a HEAD@{10}: checkout: moving from b66c7bd68f926cf9bb8b0b531252e91599d086ca to master
b66c7bd HEAD@{11}: checkout: moving from atomic_boron to b66c7bd68f926cf9bb8b0b531252e91599d086ca
b66c7bd HEAD@{12}: checkout: moving from b66c7bd68f926cf9bb8b0b531252e91599d086ca to atomic_boron
b66c7bd HEAD@{13}: checkout: moving from atomic_boron to b66c7bd68f926cf9bb8b0b531252e91599d086ca
b66c7bd HEAD@{14}: checkout: moving from atomic_boron to atomic_boron
b66c7bd HEAD@{15}: checkout: moving from master to atomic_boron
f99923a HEAD@{16}: checkout: moving from atomic_boron to master
b66c7bd HEAD@{17}: checkout: moving from 4808ed19b72af9d9b2f2dd075438284506f6cd2f to atomic_boron
4808ed1 HEAD@{18}: checkout: moving from atomic_boron to HEAD^^
b66c7bd HEAD@{19}: commit (amend): Ground and excited state boron densities are now being calculated and output.
编辑:这里是

git log --graph --oneline --decorate

* b66c7bd (HEAD, atomic_boron) Ground and excited state boron densities are now being calculated and output. The code compiles without errors.  I will begi
*   a6b561c Merge branch 'atomic_boron' of ssh://aero-mdgpu2.engin.umich.edu/home/brandon/.software/HPHall into atomic_boron
|\
| * 0c73784 Added variable MIN_YIELD during boron creation.  When the calculated sputter yield is less then MIN_YIELD, a Monte Carlo test is performed to d
* | 4808ed1 Saving my work on adding boron excitation and ionization.  I just realized that my MIN_YIELD changes that are vital to the stability of the cod
* | 14d2394 Added table lookups for ionization and excitation of boron to boron.c. I still have to write the functions that will call the lookup tables, as
* | 5e7a4af Changed struct type for boron atoms from neutral_type to boron_type, which includes a tag for the electronic state of the atoms. This will allo
|/
* 6fd8010 Forgot to initialize "boron_per_cell".  Added a line to allocate the memory for that variable.
* a83a6ce Added some lines to zero the boron fluxes during initialization.
* e205831 Oops.
* 0294ab6 Hack fix...  Moved check for being past cell boundaries to before the xi-eta integration.  This should at least give me some results for an IEPC
* e395310 Trying to debug by tracking where B atoms are created...
* f99923a (master) Fixed first set of bugs.  Am now dealing with seg faults due to boron atoms passing the right-hand side of the domain.  This may be rela
* 5b7c89b Have compiling code with boron.  Proceeding to testing and debugging.
* e8c1572 Yet another commit to save my work...
* eade77e Major additions to boron.c.  boron_create() is nearly finished; Only need to finish coding velocity components and addition of particles to boron
* 13a98fc Second commit on atomic_boron...  Just saving my work, nothing to see here.
* 49b2ef1 Initial commit on branch atomic_boron.

看来我只是在装傻。这里没什么好玩的!谢谢你的帮助,Makoto

当你在
原子硼分支上时,
git log--graph--oneline--decoration
告诉你什么?奇怪的是,它说我在头上,原子硼,散列b66c7bd。那就是我想去的地方,所以我想我只是做了些蠢事。谢谢你的回复。我想我可以把这个问题标出来。介意把它粘贴到问题里吗?我相信您(还有一个
git status
会证实这一点),但我想确保您看到的内容与您所说的内容相同。将
--all
添加到
git日志…
命令以查看所有提交,而不仅仅是从您所在的位置可以访问到的提交。像或这样的存储库可视化工具可以让您更好地查看存储库的状态。