Welcome to my little repository of knowledge, a random collection of information and tips I have gathered over time and will occasionally reference.

Git

Delete the last 4 commits.

Make a backup of your work and run:
> git reset --hard HEAD~4
> git push origin HEAD --force

Note: If you used the wrong account it might still contain the account as a contributor.

Git

A better git pull.

Source: Philomatics

> git pull --rebase

Merge conflict? Undo with:
> git rebase --abort

Git

Custom git commands.

Source: Philomatics

Set VSCode as default editor and open editor.
> git config --global core.editor "code --wait"
> git config --global --edit

Useful aliases to add under [alias] section.
sta = status -s
editg = config --global --edit
editl = config --local --edit