Version control systems like Git are tools used to track changes to source code (or other collections of files and folders). As the name implies, these tools help maintain a history of changes; furthermore, they facilitate collaboration. Source : Missing-Semester/Git

Introduction to git slides

$ git init
$ git add .
$ git checkout -- .
$ git commit -m "First Commit"
$ git commit --amend -m "An updated commit message"
$ git status
$ git log
$ git log --all --graph --decorate
$ git checkout <commit-id>
$ git checkout -b <branch>
$ git diff
$ git merge <branch-name>
$ git reflog
$ git reset HEAD@{<id>}
$ git reset --hard HEAD~<number-of-commits-to-undo>
$ git push origin HEAD -f


In case of merge conflict, resolve conflict manually / using VSCode / other tools.