# Arch
sudo Pacman -S git
# Windows 10
scoop install git
# Linux
git config --global core.autocrlf input
# Windows
git config --global core.autocrlf true
git config --global user.email "user@email.com"
git config --global user.name "username"
git init
git remote add origin https://github.com/<user>/<repo>
git branch -M main
# git diff
git add <file1> <dir1> <dir2>
# git status
git commit -m "<commit_info>"
# git push -u origin main
git push
# git pull origin main
git pull
# git tag -d v0.0.1
# git push --delete origin v0.0.1
git tag v0.0.1
git push origin v0.0.1
# Undo and re-push
git fetch --all
git reset --hard <commit-hash>
# git reset --hard HEAD~1
git push --force origin <branch>
# Rebase the above 3 commit
git rebase -i HEAD~3
pick <the first commit>
squash <will merge into first commit>
squash <will merge into first commit>