How to Undo Mistakes With Git Using the Command Line

How to Undo Mistakes With Git Using the Command Line

freeCodeCamp.org via freeCodeCamp Direct link

) Introduction

1 of 27

1 of 27

) Introduction

Class Central Classrooms beta

YouTube playlists curated by Class Central.

Classroom Contents

How to Undo Mistakes With Git Using the Command Line

Automatically move to the next video in the Classroom when playback concludes

  1. 1 ) Introduction
  2. 2 ) Hosted by Tower
  3. 3 ) Git as your safety net
  4. 4 ) Discard all local changes in a file
  5. 5 ) Please be careful: discarding local changes cannot be undone!
  6. 6 ) Restoring deleted files
  7. 7 ) Discard chunks / lines in a file
  8. 8 ) Discarding all local changes
  9. 9 ) Fixing the last commit
  10. 10 ) What "rewriting history" means
  11. 11 ) Reverting a commit in the middle
  12. 12 ) Resetting to an old revision
  13. 13 ) Resetting a file to an old revision
  14. 14 ) The Reflog
  15. 15 ) Recovering deleted commits
  16. 16 ) Recovering deleted branches
  17. 17 ) Moving a commit to a new branch
  18. 18 ) Moving a commit to a different branch
  19. 19 ) Interactive Rebase: an overview of what you can do
  20. 20 ) Interactive Rebase: how it works in general
  21. 21 ) Editing old commit messages with Interactive Rebase
  22. 22 ) Deleting commits with Interactive Rebase
  23. 23 ) Squashing multiple commits into one with Interactive Rebase
  24. 24 ) Adding changes to an old commit with Interactive Rebase
  25. 25 ) Splitting/editing an old commit with Interactive Rebase
  26. 26 ) Reminder: don't rewrite commits that you have already shared!
  27. 27 ) First Aid Kit for Git: a set of short videos and a cheat sheet, free to download (www.bit.ly/git-first-aid-kit)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.