xory.dev

Quicker Git with ohmyzsh plugin

git

When using git for simple actions I tend to use the terminal* (I choose to use a git GUI for merge conflicts or git commits history browsing.)

Usually, my git workflows tend to follow these commands:

But some of these commands are somewhat lengthy or start to feel like that after typing them multiple times per day. There is where ohmyzsh default git plugin comes in.

For example:

Just writing gcam you can automatically stage all nonnew files, write a message and make a commit.

Or ggpush for easier pushing to the origin.

All commands of ohmyzsh plugin are listed here https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh

Note: There is no need to use a plugin, the same can be achieved just by adding these aliases to your preferred terminal.