Запустил "git checkout HEAD^^" на ветке B, и теперь "git checkout B" перенесет меня в старый коммит
Я делаю некоторые дополнения к коду на ветке 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.
Похоже, я просто был глуп. Ничего интересного здесь не увидеть! Спасибо за помощь, Макото!