During pair programming with my colleague Michal Těhník I watched him using git. Here are few things I learned from him.
Use git number
Git number allows you to use numbers instead of file names. If you for example need to diff some file, or add it to commit, you no longer have to copy paste the filename or type it by hand. You just type something like “git add 1“. Git number can be combined with other git commands. For example: git number diff 1
Installation Instructions (Windows)
- Download files from Github
- Extract to desired folder
- Add that folder to $PATH variable! or in the git/cmd folder
Use aliases
- instead of git status use git st
- and instead of git st use git number 🙂
- instead of git number diff use git d
- instead of git commit use git cm
My config file then looks like this:
[alias] cm = commit st = number d = number diff na = number add
Further resources: