Scroll To Top

I use Git on a daily basis; however, I don't use every command frequently so here is a quick list of git commands used infrequently. I guess this is meant to be a cheat sheet.

Immediatly checkout a branch

This one is used on a daily basis. I'm including it because when I learned git branches in a two step process (branch then checkout). It's a time wasting habbit I had to break

git checkout -b branchName

Add All uncommited files

Go to the base director and add it like so:

git add .

Remove (stage) all deleted files

If you have a number of deleted files and you want them all commited, run this command:

git add -u

Remove branch

git branch -D branch_name

Remove branch from remote

This is really handy when your using github or gitlab.

git push origin --delete branch_name

List Remote Repositories

List remote repositories you have setup

git remote -v