这是gitstatus向我显示的内容:
MacBook:Ja.git alan$ git status
On branch alan-1
Your branch is up to date with 'origin/alan-1'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Ja/Views/DictionaryTab/DictionaryTabPage.xaml.cs
modified: Ja/Views/HomeTab/HomeTabPage.xaml
modified: Ja/Views/HomeTab/HomeTabPage.xaml.cs
modified: Ja/Views/MainPage.xaml.cs
modified: Ja/Views/SettingsTab/SettingsTabPage.xaml.cs
modified: Ja/Views/SettingsTab/Subscriptions.cs
no changes added to commit (use "git add" and/or "git commit -a")
MacBook:Ja.git alan$
将感谢您的建议,因为重要的是我只是回到更改这些文件之前。
答案 0 :(得分:1)
git checkout --name_of_file允许您恢复原始版本