From 93d58ec74a015557af882d2d1fa696f63fea4052 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 03:16:46 -0800 Subject: [PATCH 01/30] Initial Home page --- Home.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 000000000..7b999f985 --- /dev/null +++ b/Home.md @@ -0,0 +1,10 @@ +# Install + +## Ubuntu + + $ sudo aptitude update + $ sudo aptitude install git-extras + +## Mac + + $ brew install git-extras \ No newline at end of file From fc08a9a16586cb25e541e1a0c9b1616e2c434857 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 06:50:27 -0800 Subject: [PATCH 02/30] Created Install (markdown) --- Install.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Install.md diff --git a/Install.md b/Install.md new file mode 100644 index 000000000..102dc180b --- /dev/null +++ b/Install.md @@ -0,0 +1,10 @@ +# Install + +## Debian + + $ sudo $apt_pref update + $ sudo $apt_pref install git-extras + +## Mac + + $ brew install git-extras \ No newline at end of file From 77502c79088cdf6db4d7c6d3b85660bd9caf9d7e Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 06:50:40 -0800 Subject: [PATCH 03/30] Updated Install (markdown) --- Install.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Install.md b/Install.md index 102dc180b..dece9d19b 100644 --- a/Install.md +++ b/Install.md @@ -1,5 +1,3 @@ -# Install - ## Debian $ sudo $apt_pref update From 1b514d3cbc58dd977353748a97bceca2444fa9d9 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 06:53:25 -0800 Subject: [PATCH 04/30] copy from readme --- Install.md | 8 -------- Installation.md | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) delete mode 100644 Install.md create mode 100644 Installation.md diff --git a/Install.md b/Install.md deleted file mode 100644 index dece9d19b..000000000 --- a/Install.md +++ /dev/null @@ -1,8 +0,0 @@ -## Debian - - $ sudo $apt_pref update - $ sudo $apt_pref install git-extras - -## Mac - - $ brew install git-extras \ No newline at end of file diff --git a/Installation.md b/Installation.md new file mode 100644 index 000000000..8ea2026ca --- /dev/null +++ b/Installation.md @@ -0,0 +1,24 @@ +## Debian + +```bash +$ sudo $apt_pref update +$ sudo $apt_pref install git-extras +``` + +## Mac + +```bash +$ brew install git-extras +``` + +## Clone / Tarball: + +```bash +$ make install +``` + +One-liner: + +```bash +$ (cd /tmp && git clone --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install) +``` \ No newline at end of file From 15be9bb5ea0552e02e4170eb6cb27028bb82198f Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 06:56:31 -0800 Subject: [PATCH 05/30] add screencasts --- Home.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Home.md b/Home.md index 7b999f985..04802fb8c 100644 --- a/Home.md +++ b/Home.md @@ -1,10 +1,9 @@ -# Install +## Screencasts -## Ubuntu +Just getting started? Check out these screencasts: - $ sudo aptitude update - $ sudo aptitude install git-extras +* [introduction](https://vimeo.com/45506445) -- covering git-ignore, git-setup, git-changelog, git-release, git-effort and more -## Mac +## Installation - $ brew install git-extras \ No newline at end of file +See page [Installation](https://github.com/tj/git-extras/wiki/Installation). From fe618642eb37bbf0e4def246c6adf317eb6bf6e6 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:06:38 -0800 Subject: [PATCH 06/30] add commands page, all copy & paste --- Commands.md | 669 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 669 insertions(+) create mode 100644 Commands.md diff --git a/Commands.md b/Commands.md new file mode 100644 index 000000000..a8cf8ed1a --- /dev/null +++ b/Commands.md @@ -0,0 +1,669 @@ + + - [`git extras`](#git-extras) + - `git squash` + - `git summary` + - `git effort` + - `git changelog` + - `git commits-since` + - `git count` + - `git create-branch` + - `git delete-branch` + - `git delete-submodule` + - `git delete-tag` + - `git delete-merged-branches` + - `git fresh-branch` + - `git graft` + - `git alias` + - `git ignore` + - `git info` + - `git fork` + - `git release` + - `git contrib` + - `git repl` + - `git undo` + - `git gh-pages` + - `git setup` + - `git touch` + - `git obliterate` + - `git feature` + - `git refactor` + - `git bug` + - `git local-commits` + - `git archive-file` + - `git missing` + - `git lock` + - `git locked` + - `git unlock` + - `git reset-file` + - `git pr` + - `git root` + +## git-extras + +The main `git-extras` command. + +Output the current `--version`: + +```bash +$ git extras +``` + +List available commands: + +```bash +$ git extras --help +``` + +Update to the latest `git-extras`: + +```bash +$ git extras update +``` +## git-gh-pages + +Sets up the `gh-pages` branch. (See [GitHub Pages](http://pages.github.com/) documentation.) + +## git-[feature|refactor|bug] [finish] <name> + +Create the given feature, refactor, or bug branch `name`: + +```bash +$ git feature dependencies +``` + +Afterwards, the same command will check it out: + +```bash +$ git checkout master +$ git feature dependencies +``` + +When finished, we can `feature finish` to merge it into the current branch: + +```bash +$ git checkout master +$ git feature finish dependencies +``` + +All of this works with `feature`, `bug`, or `refactor`. + +## git-contrib <author> + +Output `author`'s contributions to a project: + +```bash +$ git contrib visionmedia +visionmedia (18): + Export STATUS_CODES + Replaced several Array.prototype.slice.call() calls with Array.prototype.unshift.call() + Moved help msg to node-repl + Added multiple arg support for sys.puts(), print(), etc. + Fix stack output on socket error + ... +``` + +## git-summary + +Outputs a repo summary: + +```bash +$ git summary + +project : git-extras +repo age : 10 months ago +commits : 163 +active : 60 days +files : 93 +authors : + 97 Tj Holowaychuk 59.5% + 37 Jonhnny Weslley 22.7% + 8 Kenneth Reitz 4.9% + 5 Aggelos Orfanakos 3.1% + 3 Jonathan "Duke" Leto 1.8% + 2 Gert Van Gool 1.2% + 2 Domenico Rotiroti 1.2% + 2 Devin Withers 1.2% + 2 TJ Holowaychuk 1.2% + 1 Nick Campbell 0.6% + 1 Alex McHale 0.6% + 1 Jason Young 0.6% + 1 Jens K. Mueller 0.6% + 1 Guillermo Rauch 0.6% +``` + +This command can also take a *commitish*, and will print a summary for commits in +the commmitish range: + +```bash +$ git summary v42.. +``` + +This command can also take an options `--line`, will print a summary by lines + +```bash +$ git summary --line + +project : git-extras + lines : 8420 + authors : + 2905 Tj Holowaychuk 34.5% + 1901 Jonhnny Weslley 22.6% + 1474 nickl- 17.5% + 653 Leila Muhtasib 7.8% + 275 Tony 3.3% + 267 Jesús Espino 3.2% + 199 Philipp Klose 2.4% + 180 Michael Komitee 2.1% + 178 Tom Vincent 2.1% + 119 TJ Holowaychuk 1.4% + 114 Damian Krzeminski 1.4% + 66 Kenneth Reitz 0.8% + 22 Not Committed Yet 0.3% + 17 David Baumgold 0.2% + 12 Brian J Brennan 0.1% + 6 Leandro López 0.1% + 6 Jan Krueger 0.1% + 6 Gunnlaugur Thor Briem 0.1% + 3 Hogan Long 0.0% + 3 Curtis McEnroe 0.0% + 3 Alex McHale 0.0% + 3 Aggelos Orfanakos 0.0% + 2 Phally 0.0% + 2 NANRI 0.0% + 2 Moritz Grauel 0.0% + 1 Jean Jordaan 0.0% + 1 Daniel Schildt 0.0% +``` + +## git-effort [file ....] + + Displays "effort" statistics, currently just the number of commits per file, showing highlighting where the most activity is. The "active days" column is the total number of days which contributed modifications to this file. + +``` +node (master): git effort --above 15 {src,lib}/* +``` + + ![git effort](http://f.cl.ly/items/0b0w0S2K1d100e2T1a0D/Screen%20Shot%202012-02-08%20at%206.43.34%20PM.png) + + If you wish to ignore files with commits `<=` a value you may use `--above`: + +``` +$ git effort --above 5 +``` + + By default `git ls-files` is used, however you may pass one or more files to `git-effort(1)`, for example: + +``` +$ git effort bin/* lib/* +``` + +## git-repl + +GIT read-eval-print-loop: + +```bash +$ git repl + +git> ls-files +History.md +Makefile +Readme.md +bin/git-changelog +bin/git-count +bin/git-delete-branch +bin/git-delete-tag +bin/git-ignore +bin/git-release + +git> quit +``` + +## git-commits-since [date] + +List commits since `date` (defaults to "last week"): + +```bash +$ git commits-since +... changes since last week +TJ Holowaychuk - Fixed readme +TJ Holowaychuk - Added git-repl +TJ Holowaychuk - Added git-delete-tag +TJ Holowaychuk - Added git-delete-branch + +$ git commits-since yesterday +... changes since yesterday +TJ Holowaychuk - Fixed readme +``` + +## git-count + +Output commit count: + +```bash +$ git count + +total 1844 +``` + +Output detailed commit count: + +```bash +$ git count --all + +visionmedia (1285) +Tj Holowaychuk (430) +Aaron Heckmann (48) +csausdev (34) +ciaranj (26) +Guillermo Rauch (6) +Brian McKinney (2) +Nick Poulden (2) +Benny Wong (2) +Justin Lilly (1) +isaacs (1) +Adam Sanderson (1) +Viktor Kelemen (1) +Gregory Ritter (1) +Greg Ritter (1) +ewoudj (1) +James Herdman (1) +Matt Colyer (1) + +total 1844 +``` + +## git-fork + +Fork the given github <repo>. Like clone but forks first. + +```Shell +$ git fork https://github.com/LearnBoost/expect.js +``` + +or just: + +```Shell +$ git fork LearnBoost/expect.js +``` + +Does the following: +- forks the repo (prompts for github username and pass) +- clones the repo into the current directory +- adds the original repo as a remote so can track upstream changes +- all remotes refs use git over ssh + + +```Shell +$ cd expect.js && git remote -v +origin git@github.com:/expect.js (fetch) +origin git@github.com:/expect.js (push) +upstream git@github.com:LearnBoost/expect.js (fetch) +upstream git@github.com:LearnBoost/expect.js (push) +``` + + +## git-release + +Release commit with the given <tag>: + +```bash +$ git release 0.1.0 +``` + +Does the following: + + - Executes _.git/hooks/pre-release.sh_ (if present) + - Commits changes (to changelog etc) with message "Release <tag>" + - Tags with the given <tag> + - Push the branch / tags + - Executes _.git/hooks/post-release.sh_ (if present) + +## git-alias + +Define, search and show aliases. + +Define a new alias: + +```bash +$ git alias last "cat-file commit HEAD" +``` + +Search for aliases that match a pattern (one argument): + +```bash +$ git alias ^la +last = cat-file commit HEAD +``` + +Show all aliases (no arguments): + +```bash +$ git alias +s = status +amend = commit --amend +rank = shortlog -sn --no-merges +whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short +whois = !sh -c 'git log -i -1 --pretty="format:%an <%ae> +``` + +## git-ignore [pattern ...] + +Too lazy to open up `.gitignore`? Me too! + +```bash +$ git ignore build "*.o" "*.log" +... added 'build' +... added '*.o' +... added '*.log' +``` + +Without any patterns, `git-ignore` displays currently ignored patterns: + +```bash +$ git ignore +build +*.o +*.log +``` + +## git-info + +Show information about the repo: + +```bash +$ git info + + ## Remote URLs: + + origin git@github.com:sampleAuthor/git-extras.git (fetch) + origin git@github.com:sampleAuthor/git-extras.git (push) + + ## Remote Branches: + + origin/HEAD -> origin/master + origin/myBranch + + ## Local Branches: + + myBranch + * master + + ## Most Recent Commit: + + commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 + Author: Sample Author + + Added git-info command. + + Type 'git log' for more commits, or 'git show ' for full commit details. + + ## Configuration (.git/config): + + color.diff=auto + color.status=auto + color.branch=auto + user.name=Sample Author + user.email=sampleAuthor@gmail.com + core.repositoryformatversion=0 + core.filemode=true + core.bare=false + core.logallrefupdates=true + core.ignorecase=true + remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* + remote.origin.url=git@github.com:mub/git-extras.git + branch.master.remote=origin + branch.master.merge=refs/heads/master + +``` + +If you wish to omit the config section, you may use `--no-config`: + +```bash +$ git info --no-config +``` + +## git-create-branch <name> + +Create local and remote branch `name`: + +```bash +$ git create-branch development +``` + +## git-delete-branch <name> + +Delete local and remote branch `name`: + +```bash +$ git delete-branch integration +``` + +## git-delete-submodule <name> + +Delete submodule `name`: + +```bash +$ git delete-submodule lib/foo +``` + +## git-delete-tag <name> + +Delete local and remote tag `name`: + +```bash +$ git delete-tag 0.0.1 +``` + +## git-delete-merged-branches + +Deletes branches that are listed in `git branch --merged`. + +```bash +$ git delete-merged-branches +Deleted feature/themes (was c029ab3). +Deleted feature/live_preview (was a81b002). +Deleted feature/dashboard (was 923befa). +... +``` + +## git-fresh-branch <name> + +Create empty local branch `name`: + +```bash +$ git fresh-branch docs +``` + +## git-graft <src-branch> [dest-branch] + +Merge commits from `src-branch` into `dest-branch`. (`dest-branch` defaults to `master`.) + +```bash +$ git graft new_feature dev +$ git graft new_feature +``` + +## git-squash <src-branch|commit ref> [msg] + +Merge commits from `src-branch` into the current branch as a _single_ commit. +Also works if a commit reference from the current branch is provided. +When `[msg]` is given `git-commit(1)` will be invoked with that message. This is +useful when small individual commits within a topic branch are irrelevant and +you want to consider the topic as a single change. + +```bash +$ git squash fixed-cursor-styling +$ git squash fixed-cursor-styling "Fixed cursor styling" +$ git squash 95b7c52 +$ git squash HEAD~3 +$ git squash HEAD~3 "Work on a feature" +``` + +## git-changelog + +Populate a file whose name matches `change|history -i_` with commits +since the previous tag. (If there are no tags, populates commits since the project began.) + +Opens the changelog in `$EDITOR` when set. + +```bash +$ git changelog --tag 1.5.2 && cat History.md + +1.5.2 / 2010-08-05 +================== + +* Docs for git-ignore. Closes #3 +* Merge branch 'ignore' +* Added git-ignore +* Fixed in docs +* Install docs +* Merge branch 'release' +* Added git-release +* Passing args to git shortlog +* Added --all support to git-count +* Initial commit +``` + +List commits: + +```bash +$ git changelog --list + +* Docs for git-ignore. Closes #3 +* Merge branch 'ignore' +* Added git-ignore +* Fixed in docs +* Install docs +* Merge branch 'release' +* Added git-release +* Passing args to git shortlog +* Added --all support to git-count +* Initial commit +``` + +## git-undo + +Remove the latest commit: + +```bash +git undo +``` + +Remove the latest 3 commits: + +```bash +git undo 3 +``` + +## git-setup [dir] + +Set up a git repository (if one doesn't exist), add all files, and make an initial commit. `dir` defaults to the current working directory. + +## git-touch [filename] + +Call `touch` on the given file, and add it to the current index. One-step creation of new files. + +## git-obliterate [filename] + +Completely remove a file from the repository, including past commits and tags. + +```bash +git obliterate secrets.json +``` + +## git-local-commits + +List all commits on the local branch that have not yet been sent to origin. Any additional arguments will be passed directly to git log. + +## git-archive-file + +Creates an zip archive of the current git repository. The name of the archive will depend on the current HEAD of your git respository. + +## git-missing [branch1] branch2 + +Print out which commits are on one branch or the other but not both. + +```bash +$ git missing master +< d14b8f0 only on current checked out branch +> 97ef387 only on master +``` + +## git-rebase-patch patch-file + +Given a patch that doesn't apply to the current HEAD, find the latest commit +it applies to and do a rebase. For example: + +```bash +$ git rebase-patch test.patch +Trying to find a commit the patch applies to... +Patch applied to dbcf408dd26 as 7dc8b23ae1a +First, rewinding head to replay your work on top of it... +Applying: test.patch +Using index info to reconstruct a base tree... +Falling back to patching base and 3-way merge... +Auto-merging README.txt +``` + +## git-lock filename + +Lock a local file `filename`: + +```bash +$ git lock config/database.yml +``` + +## git-locked + +List local locked files: + +```bash +$ git locked +config/database.yml +``` + +## git-unlock filename + +Unlock a local file `filename` + +```bash +$ git unlock config/database.yml +``` + +## git-reset-file filename [commit] + +Reset one file to `HEAD` or certain commit + +Reset one file to HEAD + +```bash +$ git reset-file .htaccess +``` + +or reset one file to certain commit + +```bash +$ git reset-file .htaccess dc82b19 +``` + +## git-pr number + +Checks out a pull request from GitHub + +```bash +$ git pr 226 +From https://github.com/tj/git-extras + * [new ref] refs/pulls/226/head -> pr/226 +Switched to branch 'pr/226' +``` + +## git-root + +show the path to root directory of git repo + +```bash +$ pwd +.../very-deep-from-root-directory +$ cd `git root` +$ git add . && git commit +``` \ No newline at end of file From 866416b65e01d5193121c01fad351b0ef0092db7 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:07:13 -0800 Subject: [PATCH 07/30] add commands page link --- Home.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Home.md b/Home.md index 04802fb8c..5f26e6aef 100644 --- a/Home.md +++ b/Home.md @@ -7,3 +7,7 @@ Just getting started? Check out these screencasts: ## Installation See page [Installation](https://github.com/tj/git-extras/wiki/Installation). + +## Commands + +See [Commands](https://github.com/tj/git-extras/wiki/Commands) page \ No newline at end of file From fdca066f90f6811576e85ab879f09d18ac2dc534 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:09:25 -0800 Subject: [PATCH 08/30] adding links turn out to be a pain, go to sleep From 8585e0060d6a5eacfdade95dc4a0fa5b6fe63dde Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:16:19 -0800 Subject: [PATCH 09/30] gonna use the clean sub command for each command explanation --- Commands.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Commands.md b/Commands.md index a8cf8ed1a..e0550e767 100644 --- a/Commands.md +++ b/Commands.md @@ -1,6 +1,6 @@ - [`git extras`](#git-extras) - - `git squash` + - `git squash`(#git-squash) - `git summary` - `git effort` - `git changelog` @@ -38,7 +38,7 @@ - `git pr` - `git root` -## git-extras +## git extras The main `git-extras` command. From 67d48c768265a5596cbedad3ac4ab68ea925d093 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:16:59 -0800 Subject: [PATCH 10/30] Updated Commands (markdown) --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index e0550e767..293e00c56 100644 --- a/Commands.md +++ b/Commands.md @@ -483,7 +483,7 @@ $ git graft new_feature dev $ git graft new_feature ``` -## git-squash <src-branch|commit ref> [msg] +## git-squash Merge commits from `src-branch` into the current branch as a _single_ commit. Also works if a commit reference from the current branch is provided. From b46740bd33bd14ff1f703a27361bb8984ced45dc Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:17:15 -0800 Subject: [PATCH 11/30] Updated Commands (markdown) --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 293e00c56..3a221ded2 100644 --- a/Commands.md +++ b/Commands.md @@ -1,6 +1,6 @@ - [`git extras`](#git-extras) - - `git squash`(#git-squash) + - [`git squash`](#git-squash) - `git summary` - `git effort` - `git changelog` From 48f85b4039aaf5c6fd924ec266b47621d56d4662 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:17:47 -0800 Subject: [PATCH 12/30] Updated Commands (markdown) --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 3a221ded2..3b3b1abce 100644 --- a/Commands.md +++ b/Commands.md @@ -483,7 +483,7 @@ $ git graft new_feature dev $ git graft new_feature ``` -## git-squash +## git squash Merge commits from `src-branch` into the current branch as a _single_ commit. Also works if a commit reference from the current branch is provided. From 0f5985889b861dec512c2cf61d6283371622d19b Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:39:26 -0800 Subject: [PATCH 13/30] roughly finished --- Commands.md | 168 ++++++++++++++++++++++++++-------------------------- 1 file changed, 83 insertions(+), 85 deletions(-) diff --git a/Commands.md b/Commands.md index 3b3b1abce..edfd4bffb 100644 --- a/Commands.md +++ b/Commands.md @@ -1,42 +1,40 @@ - [`git extras`](#git-extras) - [`git squash`](#git-squash) - - `git summary` - - `git effort` - - `git changelog` - - `git commits-since` - - `git count` - - `git create-branch` - - `git delete-branch` - - `git delete-submodule` - - `git delete-tag` - - `git delete-merged-branches` - - `git fresh-branch` - - `git graft` - - `git alias` - - `git ignore` - - `git info` - - `git fork` - - `git release` - - `git contrib` - - `git repl` - - `git undo` - - `git gh-pages` - - `git setup` - - `git touch` - - `git obliterate` - - `git feature` - - `git refactor` - - `git bug` - - `git local-commits` - - `git archive-file` - - `git missing` - - `git lock` - - `git locked` - - `git unlock` - - `git reset-file` - - `git pr` - - `git root` + - [`git summary`](#git-summary) + - [`git effort`](#git-effort) + - [`git changelog`](#git-changelog) + - [`git commits-since`](#git-commits-since) + - [`git count`](#git-count) + - [`git create-branch`](#git-create-branch) + - [`git delete-branch`](#git-delete-branch) + - [`git delete-submodule`](#git-delete-submodule) + - [`git delete-tag`](#git-delete-tag) + - [`git delete-merged-branches`](#git-delete-merged-branches) + - [`git fresh-branch`](#git-fresh-branch) + - [`git graft`](#git-graft) + - [`git alias`](#git-alias) + - [`git ignore`](#git-ignore) + - [`git info`](#git-info) + - [`git fork`](#git-fork) + - [`git release`](#git-release) + - [`git contrib`](#git-contrib) + - [`git repl`](#git-repl) + - [`git undo`](#git-undo) + - [`git gh-pages`](#git-gh-pages) + - [`git setup`](#git-setup) + - [`git touch`](#git-touch) + - [`git obliterate`](#git-obliterate) + - [`git feature|refactor|bug`](#git-feature|refactor|bug) + - [`git local-commits`](#git-local-commits) + - [`git archive-file`](#git-archive-file) + - [`git missing`](#git-missing) + - [`git lock`](#git-lock) + - [`git locked`](#git-locked) + - [`git unlock`](#git-unlock) + - [`git reset-file`](#git-reset-file) + - [`git pr`](#git-pr) + - [`git root`](#git-root) ## git extras @@ -59,11 +57,11 @@ Update to the latest `git-extras`: ```bash $ git extras update ``` -## git-gh-pages +## git gh-pages Sets up the `gh-pages` branch. (See [GitHub Pages](http://pages.github.com/) documentation.) -## git-[feature|refactor|bug] [finish] <name> +## git feature Create the given feature, refactor, or bug branch `name`: @@ -87,7 +85,7 @@ $ git feature finish dependencies All of this works with `feature`, `bug`, or `refactor`. -## git-contrib <author> +## git contrib Output `author`'s contributions to a project: @@ -102,7 +100,7 @@ visionmedia (18): ... ``` -## git-summary +## git summary Outputs a repo summary: @@ -115,20 +113,20 @@ commits : 163 active : 60 days files : 93 authors : - 97 Tj Holowaychuk 59.5% - 37 Jonhnny Weslley 22.7% - 8 Kenneth Reitz 4.9% - 5 Aggelos Orfanakos 3.1% - 3 Jonathan "Duke" Leto 1.8% - 2 Gert Van Gool 1.2% - 2 Domenico Rotiroti 1.2% - 2 Devin Withers 1.2% - 2 TJ Holowaychuk 1.2% - 1 Nick Campbell 0.6% - 1 Alex McHale 0.6% - 1 Jason Young 0.6% - 1 Jens K. Mueller 0.6% - 1 Guillermo Rauch 0.6% + 97 Tj Holowaychuk 59.5% + 37 Jonhnny Weslley 22.7% + 8 Kenneth Reitz 4.9% + 5 Aggelos Orfanakos 3.1% + 3 Jonathan "Duke" Leto 1.8% + 2 Gert Van Gool 1.2% + 2 Domenico Rotiroti 1.2% + 2 Devin Withers 1.2% + 2 TJ Holowaychuk 1.2% + 1 Nick Campbell 0.6% + 1 Alex McHale 0.6% + 1 Jason Young 0.6% + 1 Jens K. Mueller 0.6% + 1 Guillermo Rauch 0.6% ``` This command can also take a *commitish*, and will print a summary for commits in @@ -175,7 +173,7 @@ project : git-extras 1 Daniel Schildt 0.0% ``` -## git-effort [file ....] +## git effort Displays "effort" statistics, currently just the number of commits per file, showing highlighting where the most activity is. The "active days" column is the total number of days which contributed modifications to this file. @@ -197,7 +195,7 @@ $ git effort --above 5 $ git effort bin/* lib/* ``` -## git-repl +## git repl GIT read-eval-print-loop: @@ -218,7 +216,7 @@ bin/git-release git> quit ``` -## git-commits-since [date] +## git commits-since List commits since `date` (defaults to "last week"): @@ -235,7 +233,7 @@ $ git commits-since yesterday TJ Holowaychuk - Fixed readme ``` -## git-count +## git count Output commit count: @@ -272,7 +270,7 @@ Matt Colyer (1) total 1844 ``` -## git-fork +## git fork Fork the given github <repo>. Like clone but forks first. @@ -302,7 +300,7 @@ upstream git@github.com:LearnBoost/expect.js (push) ``` -## git-release +## git release Release commit with the given <tag>: @@ -318,7 +316,7 @@ Does the following: - Push the branch / tags - Executes _.git/hooks/post-release.sh_ (if present) -## git-alias +## git alias Define, search and show aliases. @@ -346,7 +344,7 @@ whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short whois = !sh -c 'git log -i -1 --pretty="format:%an <%ae> ``` -## git-ignore [pattern ...] +## git-ignore Too lazy to open up `.gitignore`? Me too! @@ -366,7 +364,7 @@ build *.log ``` -## git-info +## git info Show information about the repo: @@ -422,7 +420,7 @@ If you wish to omit the config section, you may use `--no-config`: $ git info --no-config ``` -## git-create-branch <name> +## git create-branch Create local and remote branch `name`: @@ -430,7 +428,7 @@ Create local and remote branch `name`: $ git create-branch development ``` -## git-delete-branch <name> +## git delete-branch Delete local and remote branch `name`: @@ -438,7 +436,7 @@ Delete local and remote branch `name`: $ git delete-branch integration ``` -## git-delete-submodule <name> +## git delete-submodule Delete submodule `name`: @@ -446,7 +444,7 @@ Delete submodule `name`: $ git delete-submodule lib/foo ``` -## git-delete-tag <name> +## git delete-tag Delete local and remote tag `name`: @@ -454,7 +452,7 @@ Delete local and remote tag `name`: $ git delete-tag 0.0.1 ``` -## git-delete-merged-branches +## git delete-merged-branches Deletes branches that are listed in `git branch --merged`. @@ -466,7 +464,7 @@ Deleted feature/dashboard (was 923befa). ... ``` -## git-fresh-branch <name> +## git-fresh-branch Create empty local branch `name`: @@ -474,7 +472,7 @@ Create empty local branch `name`: $ git fresh-branch docs ``` -## git-graft <src-branch> [dest-branch] +## git graft Merge commits from `src-branch` into `dest-branch`. (`dest-branch` defaults to `master`.) @@ -499,7 +497,7 @@ $ git squash HEAD~3 $ git squash HEAD~3 "Work on a feature" ``` -## git-changelog +## git changelog Populate a file whose name matches `change|history -i_` with commits since the previous tag. (If there are no tags, populates commits since the project began.) @@ -541,7 +539,7 @@ $ git changelog --list * Initial commit ``` -## git-undo +## git undo Remove the latest commit: @@ -555,15 +553,15 @@ Remove the latest 3 commits: git undo 3 ``` -## git-setup [dir] +## git setup Set up a git repository (if one doesn't exist), add all files, and make an initial commit. `dir` defaults to the current working directory. -## git-touch [filename] +## git touch Call `touch` on the given file, and add it to the current index. One-step creation of new files. -## git-obliterate [filename] +## git obliterate Completely remove a file from the repository, including past commits and tags. @@ -571,15 +569,15 @@ Completely remove a file from the repository, including past commits and tags. git obliterate secrets.json ``` -## git-local-commits +## git local-commits List all commits on the local branch that have not yet been sent to origin. Any additional arguments will be passed directly to git log. -## git-archive-file +## git archive-file Creates an zip archive of the current git repository. The name of the archive will depend on the current HEAD of your git respository. -## git-missing [branch1] branch2 +## git missing Print out which commits are on one branch or the other but not both. @@ -605,7 +603,7 @@ Falling back to patching base and 3-way merge... Auto-merging README.txt ``` -## git-lock filename +## git lock Lock a local file `filename`: @@ -613,7 +611,7 @@ Lock a local file `filename`: $ git lock config/database.yml ``` -## git-locked +## git locked List local locked files: @@ -622,7 +620,7 @@ $ git locked config/database.yml ``` -## git-unlock filename +## git unlock Unlock a local file `filename` @@ -630,7 +628,7 @@ Unlock a local file `filename` $ git unlock config/database.yml ``` -## git-reset-file filename [commit] +## git reset-file Reset one file to `HEAD` or certain commit @@ -646,7 +644,7 @@ or reset one file to certain commit $ git reset-file .htaccess dc82b19 ``` -## git-pr number +## git pr Checks out a pull request from GitHub @@ -657,7 +655,7 @@ From https://github.com/tj/git-extras Switched to branch 'pr/226' ``` -## git-root +## git root show the path to root directory of git repo @@ -666,4 +664,4 @@ $ pwd .../very-deep-from-root-directory $ cd `git root` $ git add . && git commit -``` \ No newline at end of file +``` From e300ddfdcc355f2d4d9f10848dce5d2a123c163c Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 07:51:42 -0800 Subject: [PATCH 14/30] some remaining dashes --- Commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands.md b/Commands.md index edfd4bffb..5a9ec431a 100644 --- a/Commands.md +++ b/Commands.md @@ -344,7 +344,7 @@ whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short whois = !sh -c 'git log -i -1 --pretty="format:%an <%ae> ``` -## git-ignore +## git ignore Too lazy to open up `.gitignore`? Me too! @@ -464,7 +464,7 @@ Deleted feature/dashboard (was 923befa). ... ``` -## git-fresh-branch +## git fresh-branch Create empty local branch `name`: @@ -587,7 +587,7 @@ $ git missing master > 97ef387 only on master ``` -## git-rebase-patch patch-file +## git rebase-patch Given a patch that doesn't apply to the current HEAD, find the latest commit it applies to and do a rebase. For example: From f8a62523391e1f4f2407f2a3c51a5637006ab2d1 Mon Sep 17 00:00:00 2001 From: timfeirg Date: Tue, 16 Dec 2014 19:13:52 -0800 Subject: [PATCH 15/30] add a few keywords --- Home.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Home.md b/Home.md index 5f26e6aef..c96d96298 100644 --- a/Home.md +++ b/Home.md @@ -6,8 +6,8 @@ Just getting started? Check out these screencasts: ## Installation -See page [Installation](https://github.com/tj/git-extras/wiki/Installation). +See [Installation](https://github.com/tj/git-extras/wiki/Installation) page. ## Commands -See [Commands](https://github.com/tj/git-extras/wiki/Commands) page \ No newline at end of file +Go to [Commands](https://github.com/tj/git-extras/wiki/Commands) page for basic usage and examples. \ No newline at end of file From af404cf6aee8f8302621efb25d9be46dff563289 Mon Sep 17 00:00:00 2001 From: hemanth Date: Tue, 16 Dec 2014 20:11:06 -0800 Subject: [PATCH 16/30] Added a footer. --- _Footer.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 _Footer.md diff --git a/_Footer.md b/_Footer.md new file mode 100644 index 000000000..d9b233ee2 --- /dev/null +++ b/_Footer.md @@ -0,0 +1 @@ +__GIT utilities__ -- repo summary, repl, changelog population, author commit percentages and more From b99a6a0fed940e00779fb93d2fcf41658d29ad15 Mon Sep 17 00:00:00 2001 From: neydroid Date: Sun, 28 Dec 2014 13:48:35 -0800 Subject: [PATCH 17/30] Fix link to git feature command --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 5a9ec431a..14f785bc8 100644 --- a/Commands.md +++ b/Commands.md @@ -25,7 +25,7 @@ - [`git setup`](#git-setup) - [`git touch`](#git-touch) - [`git obliterate`](#git-obliterate) - - [`git feature|refactor|bug`](#git-feature|refactor|bug) + - [`git feature|refactor|bug`](#git-feature) - [`git local-commits`](#git-local-commits) - [`git archive-file`](#git-archive-file) - [`git missing`](#git-missing) From dae7399f7ee1806bd687d54073bc7f9f1c331609 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Fri, 6 Feb 2015 15:47:49 -0500 Subject: [PATCH 18/30] Updated Commands (markdown) --- Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands.md b/Commands.md index 14f785bc8..0c02ed113 100644 --- a/Commands.md +++ b/Commands.md @@ -4,6 +4,7 @@ - [`git summary`](#git-summary) - [`git effort`](#git-effort) - [`git changelog`](#git-changelog) + - [`git chore`](#git-chore) - [`git commits-since`](#git-commits-since) - [`git count`](#git-count) - [`git create-branch`](#git-create-branch) From 104e953dd301e6e051f8282824350f563ce1244d Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Fri, 6 Feb 2015 15:48:20 -0500 Subject: [PATCH 19/30] Updated Commands (markdown) --- Commands.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Commands.md b/Commands.md index 0c02ed113..14f785bc8 100644 --- a/Commands.md +++ b/Commands.md @@ -4,7 +4,6 @@ - [`git summary`](#git-summary) - [`git effort`](#git-effort) - [`git changelog`](#git-changelog) - - [`git chore`](#git-chore) - [`git commits-since`](#git-commits-since) - [`git count`](#git-count) - [`git create-branch`](#git-create-branch) From 50650ec314247b8dd3963c253b649c96e644145f Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Fri, 6 Feb 2015 15:48:40 -0500 Subject: [PATCH 20/30] Updated Commands (markdown) --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 14f785bc8..1017aeb5f 100644 --- a/Commands.md +++ b/Commands.md @@ -25,7 +25,7 @@ - [`git setup`](#git-setup) - [`git touch`](#git-touch) - [`git obliterate`](#git-obliterate) - - [`git feature|refactor|bug`](#git-feature) + - [`git feature|refactor|bug|chore`](#git-feature) - [`git local-commits`](#git-local-commits) - [`git archive-file`](#git-archive-file) - [`git missing`](#git-missing) From ee543f184a5fa2e70f872909edcf3e07438f58a2 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Fri, 6 Feb 2015 15:49:26 -0500 Subject: [PATCH 21/30] Updated Commands (markdown) --- Commands.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Commands.md b/Commands.md index 1017aeb5f..a34674d90 100644 --- a/Commands.md +++ b/Commands.md @@ -61,9 +61,9 @@ $ git extras update Sets up the `gh-pages` branch. (See [GitHub Pages](http://pages.github.com/) documentation.) -## git feature +## git feature / refactor / bug / chore -Create the given feature, refactor, or bug branch `name`: +Create the given feature, refactor, bug or chore branch `name`: ```bash $ git feature dependencies From cb2aa2792fc09128fbeca9ea250295eaf4af33a1 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Fri, 6 Feb 2015 15:50:25 -0500 Subject: [PATCH 22/30] Updated Commands (markdown) --- Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index a34674d90..452d87970 100644 --- a/Commands.md +++ b/Commands.md @@ -61,7 +61,7 @@ $ git extras update Sets up the `gh-pages` branch. (See [GitHub Pages](http://pages.github.com/) documentation.) -## git feature / refactor / bug / chore +## git feature Create the given feature, refactor, bug or chore branch `name`: From 0fd45396ce59b6cb2b57ef3ff4adc27a07444c18 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sun, 8 Feb 2015 10:59:36 +0100 Subject: [PATCH 23/30] Add git-authors --- Commands.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 452d87970..63f40395b 100644 --- a/Commands.md +++ b/Commands.md @@ -3,6 +3,7 @@ - [`git squash`](#git-squash) - [`git summary`](#git-summary) - [`git effort`](#git-effort) + - [`git authors`](#git-authors) - [`git changelog`](#git-changelog) - [`git commits-since`](#git-commits-since) - [`git count`](#git-count) @@ -497,6 +498,40 @@ $ git squash HEAD~3 $ git squash HEAD~3 "Work on a feature" ``` +## git authors + +Populates the file matching `authors|contributors -i` with the authors of commits, according to the number of commits per author. + +Opens the file in `$EDITOR` when set. + +See the ["MAPPING AUTHORS" section](http://git-scm.com/docs/git-shortlog#_mapping_authors) of **git-shortlog**(1) to coalesce together commits by the same person. + +Updating AUTHORS file: + +```bash +$ git authors && cat AUTHORS + +TJ Holowaychuk +Tj Holowaychuk +hemanth.hm +Jonhnny Weslley +nickl- +Leila Muhtasib +``` + +Listing authors: + +```bash +$ git authors --list + +TJ Holowaychuk +Tj Holowaychuk +hemanth.hm +Jonhnny Weslley +nickl- +Leila Muhtasib +``` + ## git changelog Populate a file whose name matches `change|history -i_` with commits @@ -664,4 +699,4 @@ $ pwd .../very-deep-from-root-directory $ cd `git root` $ git add . && git commit -``` +``` \ No newline at end of file From 30d2f07360b7262b1b6dd02070078e6ce0fb6e83 Mon Sep 17 00:00:00 2001 From: Ivan Malopinsky Date: Mon, 9 Feb 2015 23:54:54 -0500 Subject: [PATCH 24/30] git delta usage --- Commands.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Commands.md b/Commands.md index 63f40395b..81baaa880 100644 --- a/Commands.md +++ b/Commands.md @@ -699,4 +699,22 @@ $ pwd .../very-deep-from-root-directory $ cd `git root` $ git add . && git commit +``` + +## git delta + +Lists files that differ from another branch. + +```bash +$ touch README.md +$ git setup +$ git checkout -b hello +$ echo hello >> README.md +$ git delta +README.md +$ touch Makefile +$ git add Makefile +$ git delta +Makefile +README.md ``` \ No newline at end of file From fc89e17a3c7a794dcece6c0eac798e691f7a21e5 Mon Sep 17 00:00:00 2001 From: Ivan Malopinsky Date: Tue, 10 Feb 2015 00:03:09 -0500 Subject: [PATCH 25/30] link to git delta --- Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands.md b/Commands.md index 81baaa880..817fbf771 100644 --- a/Commands.md +++ b/Commands.md @@ -36,6 +36,7 @@ - [`git reset-file`](#git-reset-file) - [`git pr`](#git-pr) - [`git root`](#git-root) + - [`git delta`](#git-delta) ## git extras From 2a9ce31d25cb472c58ffbefdd857cadf1c94be0a Mon Sep 17 00:00:00 2001 From: chernjie Date: Mon, 16 Feb 2015 12:02:03 +0800 Subject: [PATCH 26/30] git scp #300 --- Commands.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Commands.md b/Commands.md index 817fbf771..f470ea27a 100644 --- a/Commands.md +++ b/Commands.md @@ -23,6 +23,7 @@ - [`git repl`](#git-repl) - [`git undo`](#git-undo) - [`git gh-pages`](#git-gh-pages) + - [`git scp`](#git-scp) - [`git setup`](#git-setup) - [`git touch`](#git-touch) - [`git obliterate`](#git-obliterate) @@ -593,6 +594,41 @@ git undo 3 Set up a git repository (if one doesn't exist), add all files, and make an initial commit. `dir` defaults to the current working directory. +## git scp + +A convenient way to copy files from the current working tree to the working directory of a remote repository. If a `...` is provided, only files that has changed within the commit range will be copied. + +Internally this script uses `rsync` and not `scp` as the name suggests. + +`git-rscp` - The reverse of `git-scp`. Copies specific files from the working directory of a remote repository to the current working directory. + +### Examples + + Copy unstaged files to remote. Useful when you want to make quick test without making any commits + + $ git scp staging + + Copy staged and unstaged files to remote + + $ git scp staging HEAD + + Copy files that has been changed in the last commit, plus any staged or unstaged files to remote + + $ git scp staging HEAD~1 + + Copy files that has been changed between now and a tag + + $ git scp staging v1.2.3 + + Copy specific files + + $ git scp staging index.html .gitignore .htaccess + + Copy specific directory + + $ git scp staging js/vendor/ + + ## git touch Call `touch` on the given file, and add it to the current index. One-step creation of new files. From b2c937e03a8f6b20f723ff824d6efc5c1e495cbc Mon Sep 17 00:00:00 2001 From: spacewander Date: Wed, 11 Mar 2015 14:47:08 +0800 Subject: [PATCH 27/30] add wiki for git-merge-into --- Commands.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Commands.md b/Commands.md index f470ea27a..0ad73057a 100644 --- a/Commands.md +++ b/Commands.md @@ -13,6 +13,7 @@ - [`git delete-tag`](#git-delete-tag) - [`git delete-merged-branches`](#git-delete-merged-branches) - [`git fresh-branch`](#git-fresh-branch) + - [`git merge-into`](#git-merge-into) - [`git graft`](#git-graft) - [`git alias`](#git-alias) - [`git ignore`](#git-ignore) @@ -475,6 +476,14 @@ Create empty local branch `name`: $ git fresh-branch docs ``` +## git merge-into + +Merge `src` branch into `dest`, and keep yourself on current branch. If `src` branch not given, it will merge current one to `dest`: + +```bash +$ git merge-into [src] dest +``` + ## git graft Merge commits from `src-branch` into `dest-branch`. (`dest-branch` defaults to `master`.) From 634fbb54b8eb003592b04288afe0bf48bb7dd072 Mon Sep 17 00:00:00 2001 From: Mark Eissler Date: Fri, 13 Mar 2015 16:15:58 -0700 Subject: [PATCH 28/30] Update docs for revised git-changelog. --- Commands.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/Commands.md b/Commands.md index 0ad73057a..6540ca67f 100644 --- a/Commands.md +++ b/Commands.md @@ -545,15 +545,36 @@ Leila Muhtasib ## git changelog -Populate a file whose name matches `change|history -i_` with commits -since the previous tag. (If there are no tags, populates commits since the project began.) +Generates a changelog from git(1) tags (annotated or lightweight) and commit messages. Existing changelog files with filenames that begin with _Change_ or _History_ will be identified automatically with a case insensitive match pattern and existing content will be appended to the new output generated--this behavior can be disabled by specifying the prune option (-p|--prune-old). The generated file will be opened in **$EDITOR** when set. -Opens the changelog in `$EDITOR` when set. +If no tags exist, then all commits are output; if tags exist, then only the most-recent commits are output up to the last identified tag. This behavior can be changed by specifing one or both of the range options (-f|--final-tag and -s|--start-tag). + +The following options are available: + +```bash + -a, --all Retrieve all commits (ignores --start-tag, --final-tag) + -l, --list Display commits as a list, with no titles + -t, --tag Tag label to use for most-recent (untagged) commits + -f, --final-tag Newest tag to retrieve commits from in a range + -s, --start-tag Oldest tag to retrieve commits from in a range + -n, --no-merges Suppress commits from merged branches + -p, --prune-old Replace existing Changelog entirely with new content + -x, --stdout Write output to stdout instead of to a Changelog file + -h, --help, ? Usage help +``` + +Type `git changelog --help` for basic usage or `man git-changelog` for more information. + +**NOTE:** By default, `git changelog` will concatenate the content of any detected changelog to its output. Use the `-p` option to prevent this behavior. + +### Examples + +Generate a new changelog consisting of all commits since the last tag, use the tag name _1.5.2_ for the title of this recent commits section (the date will be generated automatically as today's date): ```bash $ git changelog --tag 1.5.2 && cat History.md -1.5.2 / 2010-08-05 +1.5.2 / 2015-03-15 ================== * Docs for git-ignore. Closes #3 @@ -565,10 +586,9 @@ $ git changelog --tag 1.5.2 && cat History.md * Added git-release * Passing args to git shortlog * Added --all support to git-count -* Initial commit ``` -List commits: +List all commits since the last tag: ```bash $ git changelog --list @@ -582,6 +602,30 @@ $ git changelog --list * Added git-release * Passing args to git shortlog * Added --all support to git-count +``` + +List all commits since the beginning: + +```bash +$ git changelog --list --all + +* Docs for git-ignore. Closes #3 +* Merge branch 'ignore' +* Added git-ignore +* Fixed in docs +* Install docs +* Merge branch 'release' +* Added git-release +* Passing args to git shortlog +* Added --all support to git-count +... + +... +* Install docs. +* Merge branch 'release'. +* Added 'git-release'. +* Fixed readme. +* Passing args to git shortlog. * Initial commit ``` From 34c9a486bf31927ac99c8af9f4be06ec86140a57 Mon Sep 17 00:00:00 2001 From: spacewander Date: Sun, 19 Apr 2015 16:24:35 +0800 Subject: [PATCH 29/30] add wiki for git-guilt --- Commands.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Commands.md b/Commands.md index 6540ca67f..91d574e63 100644 --- a/Commands.md +++ b/Commands.md @@ -13,6 +13,7 @@ - [`git delete-tag`](#git-delete-tag) - [`git delete-merged-branches`](#git-delete-merged-branches) - [`git fresh-branch`](#git-fresh-branch) + - [`git guilt`](#git-guilt) - [`git merge-into`](#git-merge-into) - [`git graft`](#git-graft) - [`git alias`](#git-alias) @@ -476,6 +477,24 @@ Create empty local branch `name`: $ git fresh-branch docs ``` +## git guilt + +Calculate the change in blame between two revisions + +```bash +# Find blame delta over the last three weeks +$ git guilt `git log --until="3 weeks ago" --format="%H" -n 1` HEAD +Paul Schreiber +++++++++++++++++++++++++++++++++++++++++++++(349) +spacewander +++++++++++++++++++++++++++++++++++++++++++++(113) +Mark Eissler ++++++++++++++++++++++++++ +CJ +++++ +nickl- - +Jesse Sipprell - +Evan Grim - +Ben Parnell - +hemanth.hm -- +``` + ## git merge-into Merge `src` branch into `dest`, and keep yourself on current branch. If `src` branch not given, it will merge current one to `dest`: From 28982cbd2dce9030d1da218f56d0ce8152ce0f50 Mon Sep 17 00:00:00 2001 From: Ivan Malopinsky Date: Sun, 19 Apr 2015 11:15:33 -0400 Subject: [PATCH 30/30] git merge-repo --- Commands.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Commands.md b/Commands.md index 91d574e63..50db3f94f 100644 --- a/Commands.md +++ b/Commands.md @@ -40,6 +40,7 @@ - [`git pr`](#git-pr) - [`git root`](#git-root) - [`git delta`](#git-delta) + - [`git merge-repo`](#git-merge-repo) ## git extras @@ -826,4 +827,20 @@ $ git add Makefile $ git delta Makefile README.md -``` \ No newline at end of file +``` + +## git merge-repo + +Merges two repository histories. + +```bash +$ git merge-repo other-repo.git master new_dir +``` + +The above merges `other-repo.git`'s `master` branch into the current repository's `new_dir` directory. + +```bash +$ git merge-repo git@github.com:tj/git-extras.git master . +``` + +The above merges a remote repo's `master` branch into the current repository's directory, not preserving history. \ No newline at end of file