Oh My Zsh Git Aliases

You, git developmentscmoh my zsh
Back

What is Oh My Zsh

First of all, it's important to mention that, according to its website, Zsh (Z-shell) is a shell designed for interactive use, although it is also a powerful scripting language.

Oh My Zsh stands for a community-driven and open-source framework that allow Zsh configuration management and it comes bundled with thousands of helpful functions, helpers, plugins and themes (you can find my configuration here).

One of the helpful things that Oh My Zsh already has integrated is some git aliases that we can use, to write git commands but faster and more efficient.

Git aliases

Let's take a look on some aliases that you can use:

AliasCommandNotes
gcogit checkoutwrite the name of the branch you want to checkout
gco -git checkout ${previous_branch}so nice when you're working frequently in two branches
gcdgit checkout developstraightforward
gcbgit checkout -bwhen you need to create a branch
gcmsggit commit -mjust need to write the commit message using '' or ""
gpsupgit push --set-upstream origin $(current_branch)in the first push, there's no set upstream anymore
glgit pullstraightforward
gpgit pushstraightforward
gmgit mergestraightforward
gstgit statusstraightforward

Some notes

Of course, you can use and personalize your configuration with a lot of stuff. This is only one of the things that will save some (but a lot) time in your work time. :D

© Carlos Silva AbreuRSS