Skip to content

Latest commit

 

History

History
88 lines (88 loc) · 1.66 KB

README.md

File metadata and controls

88 lines (88 loc) · 1.66 KB

Git Config file

Aliases

Git Aliases are shortcuts for when using git. For example instead of typing:

git commit -m "this is my commit message"

You could instead type:

git ci "this is my commit message"

This is done by setting up an alias:

git config --global alias.ci 'commit -m'

My Aliases

I have intentionally decided to keep these to a minimum as I am not an advanced git user and stick to a few basic commands I am, currently, the only person working on the repositories that I work on.

status

Check the current status with verbose message

git config --global alias.st 'status'

add all

git config --global alias.aa 'add -A'

commit

Commit with the message flag

git config --global alias.ci 'commit -m'

branch

Switch to another branch

git config --global alias.br 'branch'

checkout

Switch to a branch or tag

git config --global alias.co 'checkout'

create branch and checkout

Create a new branch and switch to it

git config --global alias.cob 'checkout -b'

delete branch locally

Delete a branch on local machine

git config --global alias.dbl 'branch -d'

delete branch remotely

Delete a branch on local machine

git config --global alias.dbr 'push origin --delete'

My Shortcuts

status

git st

add all

git aa

commit

git ci "the commit message"

branch

git br

checkout

git co branch-name

create branch and checkout

git cob new-branch-name

delete branch locally

git dbl branch-name

delete branch remotely

git dbr branch-name