Miika Nissi (https://miikanissi.com/)


Git Guide for Dummies

This simple Git guide is satire and not meant to offend anyone. If you are a dummy or a beginner to using Git this might actually be helpful to you and work as a cheatsheet (I sometimes visit this post when I forget a command).

git clone

git push

git add <filename>

git add --patch

git commit

git pull

git checkout -b <branch name>

git checkout <branch name>

git merge <branch name>

git checkout --theirs

git checkout --ours

git commit --amend

git log

git status

git rm <filename>

git commit --fixup=<commit hash> (or --squash)

git rebase -i [--autosquash] <old commit>

That's it

Knowing how to use these Git commands is mostly all you need for a good Git workflow. Happy programming.