Work faster with Git aliases

Peter Jausovec on March 22, 2019

Back when I started with programming, there was no Git yet. I tried using Visual Sourcesafe a couple of times for some pet projects and the only ... [Read Full]
markdown guide
 

Aliases are great - they can really save a lot of time, but I always caution people from using them too much. If you ever end up in a spot where you don't have any of your aliases, you'll be struggling to remember the original command.

 

This is a good point. You can commit your aliases to a Github gist, or other online source control, just in case.

 

Good point. I usually have all my settings in a Github repo where I can pull it down if needed.

 

Nice article! I use git aliases heavily -- I personally use the zsh shell with oh-my-zsh, which comes with a huge list of git aliases in the form of a plugin (github.com/robbyrussell/oh-my-zsh/...)

It's great!

 

s = stash
st = status
cp = cherry-pick
co = checkout

I use Android Studio (Intellij-based) to checkout remote branches via GUI or the co alias to create a local branch with "git co -b ". s and st come into play in many pull-requests because I can make test modifications and revert back to where I was. Lastly, cp is useful because "cherry-pick" is very annoying to type out correctly.

 

Thanks for the article, but (yes, the infamous but) maybe you would consider adding a short paragraph early on explaining what a git alias is? I didn't know about them before and even though I found it obvious upon reading your article it would be nice to get an explanation early on.
/a git novice

 
 

Nice point. I have all my settings in a Github repo. it works very great.
Dubai’s leading multi-brand Sharp TV Repair Dubai. Get the best price on tv repairing,
Effective and at the nominal prices. Get your tv repaired by our expert technicians.

code of conduct - report abuse