a set of aliases to make complex or rare git actions more intuitive
Add the following lines to your ~/.gitconfig
[include]
path = path/to/gitin2it/aliases
where path/to/gitin2it/aliases
is the path, relative from the location of your .gitconfig
file, to the aliases
file in this repo.
alias-name required-argument [optional-argument|'default-value'] [optional-argument]
Git aliases that
- are intuitively, idiomatically named *
- replace commands that have switches...
-
git ignored
vs.git ls-files --others --exclude-standard --ignored
show ignored files in repository
-
- ... or syntax
git back
vs.git checkout HEAD~1
- are named after google searches or stack overflow questions
- "How do I unstage changes that I've commited?"
git unstage
vs.git reset
- "How do I unstage changes that I've commited?"
- Implement as-of-yet-unimplemented features
git diff-stat
automatically sizesstat
output to terminal width
- Wield the power of shell commands
- two sequential commands:
git scrub
vs.git reset --hard; git clean -f -f -d;
to remove all changes and new files - optional common defaults:
git set-upstream
// defaults toorigin
git set-upstream remote-other-than-origin
// sets the upstream remote to (an existing) one other than origin
- two sequential commands:
- abbrevations
git co
forgit checkout
- personalizations or niceities, such as a custom log format with certain fields, colors, etc.
- define approach to verb tenses, nouns, plurals (e.g.
changes
,change
,changed
) - add filename argument to
delete
ignore
: add a file or directory to .gitignoreblamedir
: like blame, but shows who introduced files in a directory
* Who decides what is intuitive or idiomatic?
I do.