Skip to main content
update link
Source Link
ironicaldiction
  • 1.2k
  • 4
  • 13
  • 28

Just to get the aliases even shorter than the standard git config way mentioned in other answers, I created an npm package created a bash function on githubmingit (npm install -g mingit) so that most commands would become 2 characters instead of 2 words. Here's the examples:

g a . // git statusadd . 

would transform to

g b other-branch // git branch other-branch g c "made some changes" // git commit -m "made some changes" g co master // git checkout master g d // git diff g f  // git fetch g i // git init g m hotfix // git merge hotfix g pll // git pull g psh // git push g s // git status 

and other commands would be similarly short. This also keeps bash completions. The package adds a bash function to your dotfiles, works on osx, linux, and windows. Also, unlike the other aliases, it aliases git -> g as well as the second parameter.

Just to get the aliases even shorter than the standard git config way mentioned in other answers, I created a bash function on github so that

git status 

would transform to

g s 

and other commands would be similarly short. This also keeps bash completions.

Just to get the aliases even shorter than the standard git config way mentioned in other answers, I created an npm package mingit (npm install -g mingit) so that most commands would become 2 characters instead of 2 words. Here's the examples:

g a . // git add . g b other-branch // git branch other-branch g c "made some changes" // git commit -m "made some changes" g co master // git checkout master g d // git diff g f  // git fetch g i // git init g m hotfix // git merge hotfix g pll // git pull g psh // git push g s // git status 

and other commands would be similarly short. This also keeps bash completions. The package adds a bash function to your dotfiles, works on osx, linux, and windows. Also, unlike the other aliases, it aliases git -> g as well as the second parameter.

Source Link
ironicaldiction
  • 1.2k
  • 4
  • 13
  • 28

Just to get the aliases even shorter than the standard git config way mentioned in other answers, I created a bash function on github so that

git status 

would transform to

g s 

and other commands would be similarly short. This also keeps bash completions.