re: My Git Aliases VIEW POST

VIEW FULL DISCUSSION

Thanks for the post Nick! There's such a lot in here and I learned about a couple of commands too. The lost and found search is interesting, not a very common use as you said, but something worth remembering just in case.

I just checked my aliases and I was almost disappointed with how few I have!

  st = status
  co = checkout

I do have this function in my .bash_profile though. It allows you to use g in place of git and if you pass no other arguments runs git status. I find it pretty useful.

function g {
 if [[ $# > 0 ]]
 then
     git $@
 else
     git status
 fi
}

Glad you like it. Thanks for suggesting I write it up. I alias git to g as well, but I like how you default to showing status of no git command is passed in. 🔥

code of conduct - report abuse