DEV Community

Discussion on: Stop aliasing core Git commands

Collapse
 
geoff profile image
Geoff Davis

I've messed around with Bash, and created a specific "Git shortcuts" bash file that essentially omits the "git" command.

This won't work in all setups, but it allows me to shorten commands while retaining readability, and tab-completion works still because it's used as a CLI:

status => git status
log => git log
branch -c someBranch => git branch someBranch && git checkout someBranch
clone -p someGitURI => git clone $(pbpaste)
pushup remoteName workingBranch => git push -u remoteName workingBranch

etc. Wondering what everyone's take on this method is.

Collapse
 
alexslynko profile image
Alex Slynko

You can use git checkout -b to create new branch and checkout to it.