简体   繁体   中英

I made changes to a lot of files but didn't yet do a commit. How can I back out of all the changes?

Here's what gitstatus shows me:

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$ 

Would appreciate advice as it's important I just go back to the point before I changed these files.

git checkout --name_of_file允许您恢复原始版本

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM