changes and manually undo them git does all of that for you note you might have to click in your editor' window to refresh the file and see the previous version checking out previous commits you can check out any commit in your lognot just the most recentby including the first six characters of the reference id instead of dot by checking it outyou can review an earlier commitand you're able to then return to the latest commit or abandon your recent work and pick up development from the earlier commitgit_practicegit log --pretty=oneline cb cff bd ab ed extended greeting be dbc ff be fd started project git_practicegit checkout be notechecking out 'be bu you are in 'detached headstate you can look aroundmake experimental changes and commit themand you can discard any commits you make in this state without impacting any branches by performing another checkout if you want to create new branch to retain commits you createyou may do so (now or laterby using - with the checkout command again examplegit checkout - new_branch_name head is now at be started project git_practicewhen you check out previous commityou leave the master branch and enter what git refers to as detached head state head is the current state of the projectwe are detached because we've left named branch (masterin this caseto get back to the master branchyou check it outgit_practicegit checkout master previous head position was be started project switched to branch 'mastergit_practicethis brings you back to the master branch unless you want to work with some more advanced features of gitit' best not to make any changes to your project when you've checked out an old commit howeverif you're appendix