DEV Community

Discussion on: Git [Script] Aliases That Could Be Helpful

Collapse
 
nickytonline profile image
Nick Taylor • Edited

Love git aliases, but as Valentin said they're shell aliases. Regardless, shell aliases and git aliases are very useful. Here's my list of git aliases if your interested.

One shell alias that find very helpful is for grabbing a PR from a repo hosted on GitHub (maybe it works on BitBucket too, not sure).

# Check out a PR
alias copr="git fetch origin pull/$argv/head:pr$argv; and git checkout pr$argv;"
funcsave copr

This is a fish shell alias, but I think you get the idea.

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju

Thanks Nick, I have seen a couple of aliases that could be helpful to me form your gist, will add them soon