From da40ca213266f6b31a017501b2e9eb7445af55e4 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sat, 10 Jun 2017 10:17:30 -0600 Subject: [PATCH 1/3] Add roots alias --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 00caeab72..9062c7049 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ Here are some helpful aliases for your `~/.gitconfig` | alias | Description | | ----- | ----------- | | `ahead-of-master = log --oneline origin/master..HEAD` | Show commits that haven't made it to master yet | +| `roots = log --all --oneline --decorate --max-parents=0` | Show the roots | | `wip = rebase -i @{u}` | Starts an interactive rebase of all the commits you haven't pushed yet. Handy for collapsing a bunch of WIP snapshots into logical commits before pushing, without having to worry about accidentally squashing a commit someone else has already referred to | ## Other useful git stuff From d9d7b2318ece225d0e4cab1ebb8cbb8c6255ac1d Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sat, 10 Jun 2017 10:19:11 -0600 Subject: [PATCH 2/3] Add fetch-pull-requests alias --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9062c7049..50951ce41 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ Here are some helpful aliases for your `~/.gitconfig` | alias | Description | | ----- | ----------- | | `ahead-of-master = log --oneline origin/master..HEAD` | Show commits that haven't made it to master yet | +| `fetch-pull-requests = fetch origin '+refs/pull/*/head:refs/remotes/origin/pull/*'` | fetch pull requests from github so you can 'git checkout pull/123' and test them locally | | `roots = log --all --oneline --decorate --max-parents=0` | Show the roots | | `wip = rebase -i @{u}` | Starts an interactive rebase of all the commits you haven't pushed yet. Handy for collapsing a bunch of WIP snapshots into logical commits before pushing, without having to worry about accidentally squashing a commit someone else has already referred to | From 9b4717e5f105ef560e13e837efb292ee48d4251a Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sat, 10 Jun 2017 10:21:41 -0600 Subject: [PATCH 3/3] Add git-unpushed alias --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 50951ce41..e02ba87de 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ Here are some helpful aliases for your `~/.gitconfig` | `ahead-of-master = log --oneline origin/master..HEAD` | Show commits that haven't made it to master yet | | `fetch-pull-requests = fetch origin '+refs/pull/*/head:refs/remotes/origin/pull/*'` | fetch pull requests from github so you can 'git checkout pull/123' and test them locally | | `roots = log --all --oneline --decorate --max-parents=0` | Show the roots | +| `unpushed = log @{u}..` | Show which commits are safe to amend/rebase | | `wip = rebase -i @{u}` | Starts an interactive rebase of all the commits you haven't pushed yet. Handy for collapsing a bunch of WIP snapshots into logical commits before pushing, without having to worry about accidentally squashing a commit someone else has already referred to | ## Other useful git stuff