$ npm install --global @jlegrone/git-config
$ npm uninstall --global @jlegrone/git-config
$ git clone https://github.com/jlegrone/git-config.git
$ cd git-config
$ git config --global --add include.path "$PWD/src/jlegrone.gitconfig"
To view the source for an alias, type
$ git help <alias>
List all available git aliases.
List all remote branches, ordered by last commit date.
List all local and remote branches containing a given commit hash.
$ git contains 27395436382cd897fd957635bd42cf78788f11b1
* feature/add-docs
master
remotes/origin/master
Rebase the current branch onto origin/develop
.
Rebases onto origin/master
if no develop
branch is present.
Caution: This command rewrites history.
Checkout a new branch based on origin/develop
, prefixed with feature
.
Uses origin/master
if no develop
branch is present.
$ git start user-service
# now on branch feature/user-service
Checkout a new branch based origin/master
, prefixed with hotfix
.
Requires a
master
branch.
$ git hotfix missing-translations
# now on branch hotfix/missing-translations
Create a "work in progress" commit with all (staged and unstaged) changes.
Undo the latest commit. The contents of that commit will remain as staged changes.
Amend the latest commit to include all (staged and unstaged) changes.
Caution: This command rewrites history.
Add staged changes to the specified commit.
Caution: This command rewrites history, and may introduce conflicts during rebase.
$ git add .
$ git fixup 27395436382cd897fd957635bd42cf78788f11b1
Edit the commit message for the specified commit.
Caution: This command rewrites history.
$ git reword 27395436382cd897fd957635bd42cf78788f11b1
Perform an interactive rebase starting from the specified commit.
Accepts all options that can be passed to git-rebase.
Caution: This command rewrites history, and may introduce conflicts during rebase.
$ git edit 27395436382cd897fd957635bd42cf78788f11b1
Push the current branch to the remote origin
, and set it to track the upstream branch.
Remove the current branch from the remote origin
.
Force push to the upstream branch, but receive a warning if new commits were added to the remote since your last checkout.
For more information, see http://weiqingtoh.github.io/force-with-lease/.
Accepts all options that can be passed to git-push.
Delete local branches that have been fully merged into master
or develop
.
Checkout a new branch. Shorthand for git checkout -b <branch-name>
.
Accepts all options that can be passed to git-checkout.
$ git cb test/my-proof-of-concept
# now on branch test/my-proof-of-concept
Show an abridged git log
output, with one line per commit.
Accepts all options that can be passed to git-log.
$ git l
6b1768a 2017-08-09 (tag: v1.3.3) Merge pull request #9 from jlegrone/feature/re-enable-release [GitHub]
1b0b519 2017-08-09 chore(travis): install dev dependencies again in post_success hook [Jacob LeGrone]
4b5cb73 2017-08-09 Merge pull request #8 from jlegrone/feature/fix-missing-dep [GitHub]
e5695bc 2017-08-09 fix(install): update to working validate-git-version [Jacob LeGrone]
3fab789 2017-08-09 test(travis): install production dependencies only [Jacob LeGrone]
...
Show an abridged git status
output which only includes files changed.
Accepts all options that can be passed to git-status.
$ git s
M README.md
M commitizen.config.js
M src/jlegrone.gitconfig