Skip to content

Instantly share code, notes, and snippets.

@jcastellanos926
Last active September 24, 2020 11:01
Show Gist options
  • Save jcastellanos926/f079a6df9ccce27fcfca09bc0536eeee to your computer and use it in GitHub Desktop.
Save jcastellanos926/f079a6df9ccce27fcfca09bc0536eeee to your computer and use it in GitHub Desktop.
Git Aliases

Git aliases

Run the following commands in order to create some git aliases for our projects.

$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.ci commit
$ git config --global alias.st status
$ git config --global alias.l log
$ git config --global alias.df diff
$ git config --global alias.a add
$ git config --global alias.last 'log -1 HEAD'

Our recently created aliases can be seen inside .gitconfig file.

[alias]
	br = branch
	st = status
	co = checkout
	ci = commit
	l = log
	df = diff
	a = add
	last = log -1 HEAD

# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment