Open
Description
- add revert demo https://github.com/Bisaloo/revertdemo/
- added in https://epiverse-trace.github.io/git-rstudio-basics/05-history.html#these-commands-are-so-similar
- linked to https://www.atlassian.com/git/tutorials/undoing-changes
keypoints:
- Once changes have been committed they are generally permanent
- Use
git checkout
to move around and review the commit history git revert
is the best tool for undoing shared public changesgit reset
is best used for undoing local private changesgit clean
for undoing uncommitted changes- use
git restore
to discard changes in working directory [this is the revert button in RStudio - misunderstanding]
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)