- Run
. setup.sh
(or.\setup.ps1
in PowerShell)
You again live in your own branch, this time we will revert some change on a branch.
- Create a branch called
reverting
- Checkout the branch
- What is the output of
git branch
? - What is the output of
git log --oneline --graph --all
- Use
cat
to see the contents of the greetings - Revert the latest change, so you get the original content in the file
- Use
cat
to see the contents of the greetings - Diff the branches
git branch
git branch <branch-name>
git branch -d <branch-name>
git checkout
git branch -v
git add
git commit
git commit -m
git revert <sha1>
git diff <branchA> <branchB>
git log --oneline --graph --all