跑" git checkout HEAD ^^"在分支B上,现在" git checkout B"带我去做旧的提交

时间:2015-02-13 19:05:05

标签: git git-detached-head

我在分支atomic_boron上添加了一些代码。遇到错误后,我运行了命令:

git checkout HEAD^^

为了回到(推测)工作状态以确保它确实起作用。但是,现在每当我跑:

git checkout atomic_boron

它将我带到旧提交。但是,git log显示较新的提交仍然存在。如果我查看最近的提交,它会让我进入一个独立的头状态,我似乎无法摆脱它。在处于分离头状态时,我尝试过运行:

git checkout -b wtf_detached_head
git checkout atomic_boron
git merge wtf_detached_head

但合并声称分支机构之间没有差异。

tl; dr:我想要做的就是将头部重新连接到atomic_boron上的最新提交,但是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!

0 个答案:

没有答案