私が行ったいくつかのgitアクションがあります。ご覧のとおり、私は新しいブランチを作成し、ファイルを変更して、変更をコミットしました。合流しようと思っている別の支店に戻った後、私が仕事をしていた支部が姿を消した。gitの不思議な消失ブランチ
fixed_merge_branchからファイルを回復する方法を知っている人はいますか?私はパニック状態だ!
[email protected]$ git branch fixed_merge_conflict
[email protected]$ git checkout fixed_merge_conflict
M ArtworkViewController.h
M ArtworkViewController.m
M ArtworkViewController.xib
M Classes/DFRAppDelegate.h
M Classes/DFRAppDelegate.m
M Classes/WorkGalleryViewController.m
M Classes/WorkGalleryViewController.xib
M DFR.xcodeproj/project.pbxproj
M DFRViewController.xib
M Data.h
M Data.m
M MainWindow.xib
M cn.lproj/Localizable.strings
M en.lproj/Localizable.strings
A fr.lproj/Localizable.strings
Switched to branch 'fixed_merge_conflict'
[email protected]$ git add .
[email protected]$ cd Classes/
[email protected]$ git add .
[email protected]$ cd ..
[email protected]$ git add -u
[email protected]$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: ArtworkViewController.h
# modified: ArtworkViewController.m
# modified: ArtworkViewController.xib
# modified: Classes/DFRAppDelegate.h
# modified: Classes/DFRAppDelegate.m
# modified: Classes/WorkGalleryViewController.m
# modified: DFR.xcodeproj/project.pbxproj
# modified: Data.h
# modified: Data.m
# modified: MainWindow.xib
# modified: cn.lproj/Localizable.strings
# modified: en.lproj/Localizable.strings
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# fr.lproj/
[email protected]$ git commit -m "re-did changes lost by merge screw up"
[detached HEAD 858491f] re-did changes lost by merge screw up
12 files changed, 110 insertions(+), 50 deletions(-)
[email protected]$ git checkout develop
Previous HEAD position was 858491f... re-did changes lost by merge screw up
Switched to branch 'develop'
[email protected]$ git branch
artwork_model
artwork_model_localisation
artwork_screen
* develop
logger
master
start_artwork_model
[email protected]$ git merge fixed_merge_conflict
fatal: 'fixed_merge_conflict' does not point to a commit
[email protected]$ git checkout fixed_merge_conflict
error: pathspec 'fixed_merge_conflict' did not match any file(s) known to git.
[email protected]$ git checkout fixed_merge_conflict
error: pathspec 'fixed_merge_conflict' did not match any file(s) known to git.
[email protected]$ git branch
artwork_model
artwork_model_localisation
artwork_screen
* develop
logger
master
start_artwork_model
[email protected]$ git checkout
[email protected]$ git branch
artwork_model
artwork_model_localisation
artwork_screen
* develop
logger
master
start_artwork_model
[email protected]$ pwd
/Users/tristan/Documents/DFR
[email protected]$
ありがとうございました!
ありがとうございます!それはまさに私が必要としたものでした。 – WoodenKitty