INIT
Make a arepository
mkdir git_toturial
cd git_toturial
git init
ADD & COMMIT
touch index.html
vi index.html
git add index.html
git commit index.html -m “init”
vi index.html
touch readme.md
git add index.html readme.md
git commit index.html readme.md -m “second”
WORKING DIRECTORY/INDEX(Staging Area)/REPOSITORY
complex..
simple image
in Git bash
DISCARD
RESET
REVERT
reverse commit
touch revert.md
- revert. This command creates a new commit that undoes the changes from a previous commit
- reset. it changes which commit a branch head is currently pointing at