Cheat Sheets

Everyday commands, config, hints and tips used for modern web development.

Git

Change the git init default branch name

Add a repo from your machine to GitHub

Latest changes from repo to your machine

Add tracking information to your work

What branch

Create a local branch and push it to GitHub

Create a PR Pull Request

Check remotes

Sync a remote fork on your machine

Sync a remote fork on Github

2fa

Change origin url

Add code on your machine to new repo

Delete branches

Merge master branch into feature branch

Merge two repos

Stop tracking a file

Stop tracking a previously tracked folder

Start tracking a previously un-tracked file

Cloning a repo from someone else's GitHub and pushing it to a repo on my GitHub

Remove an upstream repository

Clone a repo and give it a different name

Using Husky?

How to read last commit comment?

Remove commit from pull request

Show .gitconfig details

Conflicts between Windows Git and WSL Git?

If you want to rename a branch while pointed to any branch, do:

Git ref log

Use SSH in place of HTTPS

How to authenticate with GitHub using SSH

Use multiple SSH keys

Re-use SSH keys, from one machine to another

Using SSH over the HTTPS port

Change SSH key password

Specify multiple users for myself in .gitconfig?

Cant remember what your last git commit said?

Rebase changes

Rebase accept incoming in bulk

See differences between two branches

See differences between two files

Revert to a previous commit

Gitignore