• Home
  • About
    • Miles' Blog photo

      Miles' Blog

      Miles 用來記錄學習心得及筆記的地方。

    • Learn More
    • Email
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

GIT - How to Backtrack in Git

02 Mar 2018

Reading time ~1 minute

Reference : Codecademy - Learn Git - How to Backtrack in Git

  • git checkout HEAD filename : Discards changes in the working directory.
  • git reset HEAD filename : Unstages file changes in the staging area.
  • git reset commit_SHA : Resets to a previous commit in your commit history.
  • Adding multiple files to the staging area with a single command:
    git add filename_1 filename_2
    


I.T.GIT Share Tweet +1