pax_global_header00006660000000000000000000000064132421745630014521gustar00rootroot0000000000000052 comment=4ab42e218ece2be6e3f5663a48a34dea4a3b5d1a git-extras-4.5.0/000077500000000000000000000000001324217456300136165ustar00rootroot00000000000000git-extras-4.5.0/.travis.yml000066400000000000000000000005621324217456300157320ustar00rootroot00000000000000os: - linux - osx script: - ./check_integrity.sh $(find bin | cut -b 5- | xargs) # Test for the brew release - mkdir ../release && git archive --format=tar.gz HEAD > ../release/git-extras-release.tar.gz - cd ../release - tar -xzf git-extras-release.tar.gz && make PREFIX=$(pwd) INSTALL_VIA=brew - ./bin/git-extras update | grep "brew upgrade git-extras" git-extras-4.5.0/AUTHORS000066400000000000000000000060531324217456300146720ustar00rootroot00000000000000git-extras is written and maintained by TJ Holowaychuk and various contributors: Development Lead ```````````````` - TJ Holowaychuk Maintainers ``````````` - Hemanth.HM - Nimit Kalra - Nicolai Skogheim - spacewander Patches and Suggestions ``````````````````````` - Jonhnny Weslley - LeeW - Niklas Schlimm - nickl- - timfeirg - CJ - Damien Tardy-Panis - Mark Eissler - Leila Muhtasib - Richard Fearn - Jesús Espino - Kenneth Reitz - David Baumgold - Andrew Janke - Jan Schulz - Mark Pitman - Luke Childs - Sasha Khamkov - Robin Winslow - Yi EungJun - grindhold - NANRI - Chris Hall - Damian Krzeminski - Aggelos Orfanakos - Camille Reynders - Rico Sta. Cruz - Rémy HUBSCHER - Alexander Krasnukhin - Takuma Yamaguchi - Phally - Julio Napurí - Hogan Long - Ivan Malopinsky - Brian J Brennan - wooorm - Philipp Klose - Jonathan "Duke" Leto - Nils Winkler - gisphm - William Montgomery - David Rogers - Ye Lin Aung - Andre Cerqueira - Gert Van Gool - Kylie McClain - Curtis McEnroe - Guillaume Seren - go2null - Hozefa - Paul Schreiber - Patryk Małek - Newell Zhu - Marc Harter - Nate Jones - phigoro - soffolk - Alexis GRIMALDI - Domenico Rotiroti - Devin Withers - Jean Jordaan - Matiss - Allan Odgaard - Evan Grim - Tom Vincent - Justin Guenther - Richard Littauer - Florian H - Wil Moore III - Stefan VanBuren - Stephen Mathieson - Steve Mao - Todd Wolfson - Tom Ashworth - Tony - TweeKane - Valérian Galliat - Xiaopei Li - creynders - Adam Parkin - eszabpt - jykntr - meza - neydroid - nulltask - zeroDivisible - Étienne BERSAC - ☃ pitr - dead-horse - Adriaan Zonnenberg - Akim Demaille - Alex McHale - Amir Tocker - Ammar Najjar - Andreas Duering - Andrei Petcu - Andrew Griffiths - Andrew Marcinkevičius - Andrew Starr-Bochicchio - Andrey Elizarov - Angel Aguilera - Antoine Beaupré - Aurélien Scoubeau - Balazs Nadasdi - Ben Parnell - Brandon Zylstra - Brian Goad - Bruno Sutic - Carl Casbolt - Carlos Rodríguez - Ciro Nunes - Craig MacGregor - Dan Jackson - Dan Kilman - Daniel Bruder - Daniel Schildt - Dave James Miller - David Hartmann - Dung Quang - Emil Kjelsrud - George Crabtree - Greg Allen - Guillermo Rauch - Gunnlaugur Thor Briem - J.C. Yamokoski - James Manning - Jan Krueger - Jarod Stewart - Jason Young - Jens K. Mueller - Jeremy Lin - Jesse Sipprell - Jianjin Fan - Johannes Ewald - John Evans - John Hoffmann - Jon Ander Peñalba - Joshua Appelman - Justin Dugger - Kevin Woo - Konstantin Schukraft - Leandro López - Maarten Winter - Mathieu D. (MatToufoutu) - Matt Colyer - Matthew Avant - Michael Komitee - Michael Matuzak - Moritz Grauel - Nate Fischer - Nathan Rajlich - Nick Campbell - Nick Payne - Niklas Fiekas - Prayag Verma - R. Martinho Fernandes - Raphael Fleischlin - Rasmus Wriedt Larsen - Riceball LEE - Rob Kennedy - Ryan Bohn - Sam Thursfield - Sean Molenaar - Xavier Krantz - Oliver Kopp - Dominic Barnes - Edward Betts - Luis Miguel Hernanz - Timothy Hwang - Marco Glasbergen - Daniel Lublin - Matt - Sam Bostock - Zeeshan Ahmed - Isaac Mungai git-extras-4.5.0/CONTRIBUTING.md000066400000000000000000000016331324217456300160520ustar00rootroot00000000000000## Your new git-extra command should support * OSX, Linux, BSD (You may need to browse their man page)* * Bash 3.2+ (If you aren't sure, see [the Bash changelog](http://tldp.org/LDP/abs/html/bash2.html)) * Git 2.1+ *If you aren't able to test your new command on a platform, make that clear in your PR and someone else may be able to test it on their system. ## To submit a new command, you should Let's assume your new command is named `foo`. 1. Write a bash script under `./bin` called `git-foo`. 2. Read `./man/Readme.md` and write documentation for `git-foo`. 3. Don't forget to introduce it in `Commands.md`. 4. Update `./etc/git-extras-completion.zsh`. Just follow existing code. 5. (Optional) Update `./etc/bash_completion.sh`. 6. Run `./check_integrity.sh foo` to check if all done. You are welcome to open up an issue to discuss new commands or features before opening a pull request. git-extras-4.5.0/Commands.md000066400000000000000000000775161324217456300157210ustar00rootroot00000000000000 - [`git alias`](#git-alias) - [`git archive-file`](#git-archive-file) - [`git authors`](#git-authors) - [`git back`](#git-back) - [`git bug`](#git-featurerefactorbugchore) - [`git bulk`](#git-bulk) - [`git changelog`](#git-changelog) - [`git chore`](#git-featurerefactorbugchore) - [`git clear`](#git-clear) - [`git clear-soft`](#git-clear-soft) - [`git commits-since`](#git-commits-since) - [`git contrib`](#git-contrib) - [`git count`](#git-count) - [`git create-branch`](#git-create-branch) - [`git delete-branch`](#git-delete-branch) - [`git delete-merged-branches`](#git-delete-merged-branches) - [`git delete-submodule`](#git-delete-submodule) - [`git delete-tag`](#git-delete-tag) - [`git delta`](#git-delta) - [`git effort`](#git-effort) - [`git extras`](#git-extras) - [`git feature`](#git-featurerefactorbugchore) - [`git force-clone`](#git-force-clone) - [`git fork`](#git-fork) - [`git fresh-branch`](#git-fresh-branch) - [`git gh-pages`](#git-gh-pages) - [`git graft`](#git-graft) - [`git guilt`](#git-guilt) - [`git ignore`](#git-ignore) - [`git ignore-io`](#git-ignore-io) - [`git info`](#git-info) - [`git line-summary`](#git-line-summary) - [`git local-commits`](#git-local-commits) - [`git lock`](#git-lock) - [`git locked`](#git-locked) - [`git merge-into`](#git-merge-into) - [`git merge-repo`](#git-merge-repo) - [`git missing`](#git-missing) - [`git mr`](#git-mr) - [`git obliterate`](#git-obliterate) - [`git pr`](#git-pr) - [`git psykorebase`](#git-psykorebase) - [`git pull-request`](#git-pull-request) - [`git reauthor`](#git-reauthor) - [`git rebase-patch`](#git-rebase-patch) - [`git refactor`](#git-featurerefactorbugchore) - [`git release`](#git-release) - [`git rename-branch`](#git-rename-branch) - [`git rename-tag`](#git-rename-tag) - [`git repl`](#git-repl) - [`git reset-file`](#git-reset-file) - [`git root`](#git-root) - [`git rscp`](#git-scp) - [`git scp`](#git-scp) - [`git sed`](#git-sed) - [`git setup`](#git-setup) - [`git show-merged-branches`](#git-show-merged-branches) - [`git show-tree`](#git-show-tree) - [`git show-unmerged-branches`](#git-show-unmerged-branches) - [`git stamp`](#git-stamp) - [`git squash`](#git-squash) - [`git standup`](#git-standup) - [`git summary`](#git-summary) - [`git sync`](#git-sync) - [`git touch`](#git-touch) - [`git undo`](#git-undo) - [`git unlock`](#git-unlock) ## 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|chore Create/Merge the given feature, refactor, bug or chore branch `name`: ```bash $ git feature dependencies ``` To Setup a remote tracking branch: ```bash $ git feature dependencies -r upstream ``` _Note_: If no remote name is passed with the `-r` option, it will push to _origin_. 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 ``` _Note_: If a remote is setup to track the branch, it will be deleted. All of this works with `feature`, `bug`, `chore` or `refactor`. ## git contrib 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 commitish 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 line-summary WARNING: git line-summary has been replaced by [`git summary --line`](#git-summary) and will be removed in a future release. ## 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. ``` 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 ``` If you wish to see only the commits in the last month you may use `--since` (it supports the same syntax like `git log --since`): ``` $ git effort -- --since='last month' ``` 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 bulk `git bulk` adds convenient support for operations that you want to execute on multiple git repositories. * simply register workspaces that contain multiple git repos in their directory structure * run any git command on the repositories of the registered workspaces in one command to `git bulk` * use the "guarded mode" to check on each execution ```bash usage: git bulk [-g] ([-a]|[-w ]) git bulk --addworkspace git bulk --removeworkspace git bulk --addcurrent git bulk --purge git bulk --listall ``` Register a workspace so that `git bulk` knows about it (notice that must be absolute path): ```bash $ git bulk --addworkspace personal ~/workspaces/personal ``` Register the current directory as a workspace to `git bulk` ```bash $ git bulk --addcurrent personal ``` List all registered workspaces: ```bash $ git bulk --listall bulkworkspaces.personal /Users/niklasschlimm/workspaces/personal ``` Run a git command on the repositories of the current workspace: ```bash $ git bulk fetch ``` ![fetchdemo](https://cloud.githubusercontent.com/assets/876604/23709805/e8178406-041a-11e7-9a0c-01de5fbf8944.png) Run a git command on one specific workspace and its repositories: ```bash $ git bulk -w personal fetch ``` Run a git command on all workspaces and their repositories: ```bash $ git bulk -a fetch ``` Run a git command but ask user for confirmation on every execution (guarded mode): ```bash $ git bulk -g fetch ``` Remove a registered workspace: ```bash $ git bulk --removeworkspace personal ``` Remove all registered workspaces: ```bash $ git bulk --purge ``` ## git repl Git read-eval-print-loop. Let's you run `git` commands without typing 'git'. Commands can be prefixed with an exclamation mark (!) to be interpreted as a regular command. Type `exit` or `quit` to end the repl session. ```bash $ git repl git version 2.9.2 git-extras version 3.0.0 type 'ls' to ls files below current directory, '!command' to execute any command or just 'subcommand' to execute any git subcommand git (master)> 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 (master)> !echo Straight from the shell! Straight from the shell! git (master)> quit ``` ## git commits-since 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 if configured, otherwise https will be used ```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 force-clone If the clone target directory exists and is a git repository, reset its contents to a clone of the remote. ``` bash $ git force-clone [-b {branch_name}] {remote_url} {destination_path} $ git force-clone -b master https://github.com/tj/git-extras ./target-directory ``` **CAUTION**: If the repository exists, this will destroy *all* local changes to the repository - changed files will be reset and local branches will be removed. [More information](man/git-force-clone.md). ## git release Release commit with the given <tag> and other options: ```bash $ git release 0.1.0 ``` If you are using [semver](https://semver.org) in your project, you could also use the command below: (Run `git help release` for more information) ```bash $ git release --semver major/minor/patch ``` Does the following: - Executes _.git/hooks/pre-release.sh_ (if present), passing it the given tag and remain arguments - 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), passing it the given tag and remain arguments ## git rename-branch Rename a branch locally, and sync to remote via `git push`. ``` # renames any branch $ git rename-branch new-name old-name # renames current branch $ git rename-branch new-name ``` ## git rename-tag Rename a tag (locally and remotely). ``` $ git tag test $ git push --tags Total 0 (delta 0), reused 0 (delta 0) To git@myserver.com:myuser/myrepository.git * [new tag] test -> test $ git tag test $ git rename-tag test test2 Deleted tag 'test' (was 1111111) Total 0 (delta 0), reused 0 (delta 0) To git@myserver.com:myuser/myrepository.git * [new tag] test2 -> test2 remote: warning: Deleting a non-existent ref. To git@myserver.com:myuser/myrepository.git - [deleted] refs/tag/test $ git tag test2 ``` ## git reauthor Rewrite history to change author's identity. Replace the personal email and name of Jack to his work ones ```bash $ git reauthor --old-email jack@perso.me --correct-email jack@work.com --correct-name 'Jack Foobar' ``` Replace the email and name of Jack to the ones defined in the Git config ```bash $ git reauthor --old-email jack@perso.me --use-config ``` Replace only the email of Jack (keep the name already used) ```bash $ git reauthor --old-email jack@perso --correct-email jack@perso.me ``` Change only the committer email of Jack (keep the author email already used) ```bash $ git reauthor --old-email jack@perso.me --correct-email jack@work.com --type committer ``` Set Jack's identity as the only one of the whole repository ```bash $ git reauthor --all --correct-email jack@perso.me --correct-name Jack ``` Set Jack as the only committer of the whole repository (keeps authors) ```bash $ git reauthor --all --correct-email jack@perso.me --correct-name Jack --type committer ``` ## 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 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 in both your global and your local `.gitignore` files: ```bash $ git ignore Global gitignore: /Users/foo/.gitignore_global *~ .metadata --------------------------------- Local gitignore: .gitignore build *.o *.log ``` To show just the global or just the local file's contents, you can use the following optional parameters: * `-g` or `--global` to show just the global file * `-l` or `--local` to show just the local file ```bash $ git ignore -g Global gitignore: /Users/foo/.gitignore_global *~ .metadata ``` ```bash $ git ignore -l Local gitignore: .gitignore build *.o *.log ``` ## git ignore-io Generate sample gitignore file from [gitignore.io](https://www.gitignore.io) Without option, `git ignore-io ` shows the sample gitignore of specified types on screen. ```bash $ git ignore-io vim # Created by https://www.gitignore.io/api/vim ### Vim ### [._]*.s[a-w][a-z] [._]s[a-w][a-z] *.un~ Session.vim .netrwhist *~ ``` To export it to `.gitignore` file you can use the following options: * `-a` or `--append` to append the result to `.gitignore` * `-r` or `--replace` to export `.gitignore` with the result ```bash $ git ignore-io vim python ``` For efficiency, `git ignore-io` store all available types at `~/.gi_list`. To list all the available types: * `-l` or `-L` : These two options will show the list in different format. Just try it. You can also search type from the list by: * `-s ` or `--search ` ```bash $ git ignore-io -s ja django jabref java ninja ``` ## 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 Create local branch `name`: ```bash $ git create-branch development ``` Create local branch `name` and setup a remote tracking branch in `origin`: ```bash $ git create-branch -r development ``` Create local branch `name` and setup a remote tracking branch in `upstream`: ```bash $ git create-branch -r upstream development ``` ## git delete-branch Delete local and remote branch `name`: ```bash $ git delete-branch integration ``` ## git delete-submodule Delete submodule `name`: ```bash $ git delete-submodule lib/foo ``` ## git delete-tag 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 Create empty local branch `name`: ```bash $ 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`: ```bash $ git merge-into [src] dest ``` ## git graft Merge commits from `src-branch` into `dest-branch`. ```bash $ git graft new_feature master ``` ## 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. 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 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 hemanth.hm Jonhnny Weslley nickl- Leila Muhtasib ``` Listing authors: ```bash $ git authors --list TJ Holowaychuk hemanth.hm Jonhnny Weslley nickl- Leila Muhtasib ``` Listing authors without email: ```bash $ git authors --list --no-email TJ Holowaychuk hemanth.hm Jonhnny Weslley nickl- Leila Muhtasib ``` ## git back Removes the latest commits, and add their changes to your staging area. ``` $ git back # Removes the latest commit. $ git back 3 # Remove the latest 3 commits. ``` ## git changelog 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. 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 specifying 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 / 2015-03-15 ================== * 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 ``` List all commits since the last tag: ```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 ``` 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 ``` ## git undo Remove the latest commit: ```bash git undo ``` Remove the latest 3 commits: ```bash git undo 3 ``` ## git sed Run grep as directed but replace the given files with the pattern. ## 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 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 show-merged-branches Show all branches merged in to current HEAD. ## git show-unmerged-branches Show all branches **not** merged in to current HEAD. ## git show-tree Show the decorated graph view of one liner summarized commits from all branches. For example, running `git show-tree` will display: ``` * 4b57684 (HEAD, develop) Merge branch upstream master. |\ | * 515e94a Merge pull request #128 from nickl-/git-extras-html-hyperlinks | |\ | | * 815db8b (nickl/git-extras-html-hyperlinks, git-extras-html-hyperlinks) help ronn make hyperlinks. | * | 7398d10 (nickl/develop) Fix #127 git-ignore won't add duplicates. | |/ | | * ab72c1e (refs/stash) WIP on develop: 5e943f5 Fix #127 git-ignore won't add duplicates. | |/ |/| * | 730ca89 (bolshakov) Rebase bolshakov with master |/ * 60f8371 (origin/master, origin/HEAD, master) Merge pull request #126 from agrimaldi/fix-changelog-last-tag ... ``` Be free to try it for yourself! ## git stamp Stamp the last commit message Commit message is ```bash Fix timezone bug ``` Reference the issues numbers from your bug tracker ```bash $ git stamp Issue FOO-123 commit 787590e42c9bacd249f3b79faee7aecdc9de28ec Author: Jack Commit: Jack Fix timezone bug Issue FOO-123 $ git stamp Issue FOO-456 \#close commit f8d920511e052bea39ce2088d1d723b475aeff87 Author: Jack Commit: Jack Fix timezone bug Issue FOO-123 Issue FOO-456 #close ``` Link to its review page ```bash $ git stamp Review https://reviews.foo.org/r/4567/ commit 6c6bcf43bd32a76e37b6fc9708d3ff0ae723c7da Author: Jack Commit: Jack Fix timezone bug Issue FOO-123 Issue FOO-456 #close Review https://reviews.foo.org/r/4567/ ``` Replace previous issues with a new one (Note that the identifier is case insensitive) ```bash $ git stamp --replace issue BAR-123 commit 2b93c56b2340578cc3478008e2cadb05a7bcccfa Author: Jack Commit: Jack Fix timezone bug Review https://reviews.foo.org/r/4567/ issue BAR-123 ``` ## git standup Recall what you did or find what someone else did in a given range of time. For instance, recall John's commits since last week(7 days ago): ``` git standup -a John -d 7 ``` ## git touch Call `touch` on the given file, and add it to the current index. One-step creation of new files. ## git obliterate 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 repository. ## git missing 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 lock 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 Unlock a local file `filename` ```bash $ git unlock config/database.yml ``` ## git reset-file 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 mr Checks out a merge request from GitLab. Usage: `git mr [REMOTE]`. Default remote is `origin`. ``` bash $ git mr 51 From gitlab.com:owner/repository * [new ref] refs/merge-requests/51/head -> mr/51 Switched to branch 'mr/51' ``` With full URL, the head is fetched from a temporary remote pointing to the base URL. ``` bash $ git mr https://gitlab.com/owner/repository/merge_requests/51 From gitlab.com:owner/repository * [new ref] refs/merge-requests/51/head -> mr/51 Switched to branch 'mr/51' ``` Just like [git pr](#git-pr), `git mr` accepts a `clean` argument to trash all `mr/` branches. Ensure current branch is not one. ## git pr 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' ``` To use a remote other than `origin`, e.g. `upstream` if you're working in a fork, specify it as the second parameter: ```bash $ git pr 226 upstream From https://github.com/tj/git-extras * [new ref] refs/pulls/226/head -> pr/226 Switched to branch 'pr/226' ``` You can also checkout a pull request based on a GitHub url ```bash $ git pr https://github.com/tj/git-extras/pull/453 From https://github.com/tj/git-extras * [new ref] refs/pull/453/head -> pr/453 Switched to branch 'pr/453' ``` To remove all local pull request branches, provide the magic `clean` parameter: ```bash $ git pr clean Deleted branch 'pr/226' (was 1234567). ``` ## 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 ``` ## 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 ``` ## git clear Does a hard reset and deletes all untracked files from the working directory, including those in .gitignore. ## git clear-soft Does a hard reset and deletes all untracked files from the working directory, excluding those in .gitignore. ## 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. ## git psykorebase Rebase a branch on top of another using a merge commit and only one conflict handling. ```bash $ git psykorebase master ``` The above rebase the current branch on top of `master` branch . ```bash $ git psykorebase --continue ``` The above continue the rebase after conflicts have been handled. ```bash $ git psykorebase master feature ``` The above rebase `feature` branch on top of `master` branch ## git pull-request Create pull request via commandline. ## git rebase-patch Given you have a patch that doesn't apply to the current HEAD, but you know it applied to some commit in the past, `git rebase-patch` will help you find that commit and do a rebase. For example, ``` $ 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 ``` Then your last commit has the changes of the patch and is named `test.patch`. ## git sync Sync local branch with its remote branch ```bash $ git sync ``` Sync local branch with origin/master ```bash $ git sync origin master ``` git-extras-4.5.0/History.md000066400000000000000000001300331324217456300156010ustar00rootroot000000000000004.5.0 / 2018-02-18 ================== * git-release: show message if nothing given after --semver * doc: update git-extras index * Merge pull request #639 from spacewander/avoid_deleting_local_upstream * Merge pull request #693 from xakraz/fix-mktemp-pattern * git-release: add --no-empty-commit for empty commit hater * git-release: create an empty release commit if there is nothing to commit * git-summary: unescape tab for linux column utility * git-undo: add confirmation when `-h` is specified * Fixed mktemp template to support busybox (and Alpine linux) * Merge pull request #691 from koppor/patch-1 * Remove trailing dot of German Windows * Merge pull request #690 from dominicbarnes/release-push-tags-first * feat(git-release): push tags first to help ci tools not miss them * Merge pull request #687 from spacewander/add_semver * git-release: handle extra non-numeric prefix in tag with --semver * Merge pull request #686 from spacewander/add_semver * git-release: add --semver option * Merge pull request #684 from spacewander/ignore_unknown_arg * git-release: function usage doesn't exist, ignore unknown argument instead * Merge pull request #681 from EdwardBetts/master * Fix so 'git rebase-patch' is described once. * Merge pull request #680 from lhernanz/master * Preserve the existing user_commands in the git completion system * Merge pull request #679 from spacewander/update_git_changelog_doc * Merge pull request #678 from timhwang21/devs/thwang/docs-update * Mention how to control changelog format in docs of git-changelog * Docs> Add -- in front of cmd for git log * Merge pull request #676 from gormac/master * Fix 'Invalid code page' error when resetting code page at end of script * Merge pull request #675 from quite/effort-cursor * git-effort: restore normal (visible) cursor properly * Merge pull request #674 from tj/pull-request-two-factor-auth * Add GitHub two-factor auth support to git-pull-request * Merge pull request #672 from mehandes/patch-1 * Added Nix/NixOS method of installation * Merge pull request #671 from sambostock/improve-ignore-io * Use local variables & format strings * Fix omission when alphabetically printing ignores * Remove arbitrary column limit on ignore-io * Merge pull request #670 from zeeshanu/patch-1 * Fix typo * Merge pull request #668 from isaacm/patch-1 * Fix typos, remove trailing whitespace * install: submit brew patch to upstream * Bump version to 4.5.0-dev. * git-delete-branch: avoid deleting local upstream 4.4.0 / 2017-07-15 ================== * install: display absolute path of zsh completion script * zsh: update completion of git bug|chore|feature|refactor|create-branch * git summary: use more common way to cd to top level directory * Merge pull request #664 from mapitman/master * Update man page for `create-branch` * Update man pages * Update docs for new behavior * Use "$@" instead of $@ * Consolidate feature/bug/chore/refactor logic * Allow -r parameter to be in any order in command line * Add ability to specify a remote * Fix Issue #186 * fix a wrong name in installation message * Merge pull request #662 from nschlimm/master * Added git-bulk to not_need_git_repo * fix various typos * Merge pull request #659 from bersace/mr * Add git-mr to checkout GitLab merge requests * Merge pull request #656 from dueringa/patch-1 * Fix typo in git-extras * Merge pull request #654 from spacewander/replace-xargs-r * git-delete-merged-branches: replace xargs -r option * Bump version to 4.4.0-dev. 4.3.0 / 2017-05-05 ================== * git-authors: remove trailing spaces * Merge pull request #649 from adriaanzon/patch-1 * Merge pull request #651 from spacewander/pass-arguments-to-hooks * git-release: add pre-release failure message * git release: stop if pre-release hook fails * git-release: update docs * pass release arguments to pre/post-release scripts * git-fork: Let curl exit with error code on fail * Merge pull request #647 from SMillerDev/patch-1 * Add BSD cat support * Merge pull request #646 from spacewander/upgrade-git-standup * git-standup: update zsh completion * git-standup: also update the docs * git-standup: add sanity check to -d option and overwrite -w option * git-standup: upgrade interface to catch up with kamranahmedse/git-standup * Merge pull request #642 from nschlimm/git-bulk-command * Typos again * Corrected repository location print out and docs ws-root-directory absolute path * Codereview Spacewander - whitespaces in workspace locations * Merge pull request #643 from jonyamo/git-pr_clean-git-config * Review from spacewander * Remove slashes from git-config command * Merge branch 'master' into git-bulk-command * Merge pull request #636 from spacewander/fix_rename_branch * Merge pull request #641 from tj/fix_pull_request_upstream * git-rename-branch: use detected upstream remote * git-pull-request: use detected upstream remote * Better behaviour in non workspace directories * Current workspace is default target of bulk operations * Even shorter * Code refactor * bug fix in single ws mode * code formatting * Fix in git-bulk head * New Command git-bulk initial commit * Merge pull request #635 from spacewander/fix_rename_branch * fix syntax & name variables better in rename-branch * Merge pull request #633 from nschlimm/columnsflex * taken out duplicate columns setting * Optimized file length calculation * Columns in git-effort adopt to file length * Merge pull request #630 from jjlin/rhel/centos * Add RHEL/CentOS installation * Merge pull request #629 from dankilman/fix-git-effort * Fix git-effort for paths starting with dash * Merge pull request #626 from jldugger/jldugger/email-fallback * fall back to EMAIL when user.email is not configured * Merge pull request #619 from spacewander/git-summary-separator * Merge pull request #624 from spacewander/has_git_commit * Check commit existed before running some commands * Merge pull request #615 from techjacker/master * Adds SSH prompt to git fork * use U+266A instead of comma as separator * Merge pull request #610 from nicolaiskogheim/fix-spelling * spelling: {a,an} archive. Fix #609 * Merge pull request #606 from spacewander/fix-git-extras-update * fix git-extras update and tweak Windows detection * Merge pull request #585 from tardypad/stamp * Merge pull request #578 from tardypad/count_fix_extra_arguments * stamp: show real looking results in Commands.md doc * stamp: add warning in documentation about corner case * stamp: add zsh autocompletion * stamp: remove non used multiple lines error messages * stamp: the message consists in all terms after the identifier * stamp: identifier is case insensitive for the replacement * stamp: add to Commands doc * stamp: add manual * stamp: add bash autocompletion * stamp: add replace option * stamp: display new full message as result * stamp: add extra optional message parameter * stamp: add basic script * Merge pull request #601 from richardfearn/git-sed-spaces-in-filenames * Merge pull request #603 from richardfearn/git-clear-consistent-defaults * Merge pull request #602 from richardfearn/git-delete-merged-branches-fix * git-clear-soft: change default yes/no option to "no" (as with git-clear) * git-delete-merged-branches: use "xargs -r" to prevent error when there are no branches to delete * git-sed: use "git grep -z" and "xargs -0" to cope with spaces in filenames * Merge pull request #600 from richardfearn/git-fresh-branch-fix * Merge pull request #599 from richardfearn/improve-yes-no-prompts * git-fresh-branch: fix handling of 'yes' response when there are changes * git-{clear,clear-soft,sync}: improve yes/no prompts * Merge pull request #598 from richardfearn/fix-git-sed-typo * Merge pull request #597 from richardfearn/commands-md-improvements * git-sed: fix 'unkonwn' typo * Commands.md: add link to 'git summary' in 'git line-summary' documentation * Commands.md: add links to "git bug", etc. to index * Commands.md: add 'git rscp' link to 'git scp' documentation * Commands.md: put commands in alphabetical order * Merge pull request #596 from richardfearn/archive-file-typo-fix * Fix typo in archive-file documentation * Merge pull request #595 from aaguilera/master * fix: git-squash docs. Replaced 'actual' with 'current' * Merge pull request #592 from spacewander/fix_integrity * Add travis ci * Merge pull request #594 from spacewander/fix_release * show all commit messages if no tag found * strip out branches like trap-effort-signals * Add git-reauthor to completion script * Relax #! format check * Merge pull request #591 from nottrobin/force-clone * Be explicit about only resetting git directories * Fix branch option parsing * Fix usage * Use LC_ALL=C for locale consistency * Remove unnecessary check * git-force-clone * Merge pull request #590 from bbbco/changelog-tmp-file-fix * Need to remove the temp file regardless * Merge pull request #589 from yelinaung/yla/typo-fixes * Spelling fixes for the roon file and html files * Spelling fixes * Merge pull request #588 from spacewander/no-email * Add --no-email to git-author * Bump version to 4.3.0-dev. * count: remove usage of extra arguments for detailed display 4.2.0 / 2016-10-08 ================== * remove contributors' email addresses to avoid #544 * promote two maintainers * Merge pull request #584 from grindhold/fix-583 * fixes #583 * update docs to clarify rename-branch (#581) * Make git-pr set up branch for pulling (#570) * add link to ronn git repo (#575) * add rename-branch command (#576) * Merge pull request #569 from nicolaiskogheim/docs/repl-cleanup * git-repl: improve and clean up docs * Merge pull request #568 from wcmonty/master * Add 'exit' to git-repl command documentation * Add built in 'exit' command to git-repl * Merge pull request #567 from nicolaiskogheim/git-pull-request-fix#546 * pull-request: should read local config if present * Merge pull request #566 from nfischer/fix-man-page-typo * git-release: fix typo in documentation * Merge pull request #565 from nicolaiskogheim/git-missing-argument-parsing * git-missing: do proper argument parsing. Fix #562 * Merge pull request #563 from lukechilds/improve-fork * Update git-fork man page * Merge pull request #564 from sorbits/patch-3 * Remove a non-contributor from AUTHORS * Update docs to reflect new git-fork behaviour * Set fork remotes using ssh if available * Add git reauthor (#548) * Merge pull request #555 from spacewander/contributing * modify CONTRIBUTING.md again * Merge pull request #557 from spacewander/check_integrity * Merge pull request #561 from lukechilds/improve-json-encoding * Clean up git-pull-request * Improve JSON encoding * Merge pull request #560 from lukechilds/patch-2 * Merge pull request #559 from lukechilds/patch-1 * Fix incorrect comment in git-fork * Fix typo in Installation.md * Merge pull request #558 from spacewander/fix_legacy_problem * add doc for git-pull-request and others * modify CONTRIBUTING.md * update check_integrity with nicolaiskogheim's patch * add git-release-patch to Commands.md * add git-back to Commands.md * regenerate git-obliterate doc * follow common shebang * add git-show-(un)merged-branches to Commands.md * Add check integrity script * Add contributing guideline * Merge pull request #554 from npcode/fork-origin * fork: Fetch `origin` after forking * fork: Quote refs by backtick rather than single quote * fork: Add git-fork.html removed by accident * Merge pull request #553 from npcode/fork-origin * fork: Describe the behavior if current dir is repo * fork: Rename 'origin' to 'upstream' after forking * Merge pull request #552 from npcode/fork-origin * fork: Fork 'origin' remote repo if repo is not given * Merge pull request #551 from spacewander/zsh-completion * submit zsh completion script to upstream * update the title of git-clear-soft * Merge pull request #550 from phuu/patch-1 * Add note about overwriting git aliases * Merge pull request #547 from svanburen/patch-1 * Fix typo * Merge pull request #545 from spacewander/via_ssh * fix git-fork by removing '.git' * Merge pull request #543 from spacewander/via_ssh * fix the support for forking via ssh * Merge pull request #412 from spacewander/git-obliterate * Merge pull request #536 from spacewander/delete_submodule * Merge pull request #537 from vigilancer/master * update documentation. fix "git ignore-io" flags * Update the way to delete submodule * Merge pull request #533 from Addvilz/add-git-clear-soft-modify-git-clear * Edit description of git clear-soft to indicate hard reset * Add git-clear-soft command Modify git-clear to indicate default behavior of removing git ignored files * Merge pull request #513 from lgastako/master * Merge pull request #525 from spacewander/git-standup * Merge pull request #526 from carrodher/patch-1 * Add Ubuntu installation * add docs for git standup * add git-standup * Merge pull request #519 from ifdattic/patch-1 * Fix typo: typess => types * Merge pull request #515 from ammarnajjar/fedora-install * Add Fedora package-manager installation instruction * Add -m flag to git-setup to set the initial commit message. * Merge pull request #512 from Lee-W/master * Merge pull request #1 from tj/master * Fix ignore-io searching bug * Merge pull request #508 from pra85/patch-1 * Mention initial copyright year and add contributors to copyright * Merge pull request #509 from supercrabtree/master * Fix typo in git-clear documentation * Bump version to 4.2.0-dev. * add missing git-obliterate documentation * now we can specify a commit range for git-obliterate 4.1.0 / 2016-01-25 ================== * Merge pull request #503 from spacewander/fix_502 * Merge pull request #507 from rstacruz/git-pr-manual * Regerenate git-pr.html * Merge pull request #506 from rstacruz/git-pr-manual * Update git PR manual to mention URLs * handle GIT_EDITOR which contains space * use ps -f and awk to emulate pgrep * Merge pull request #500 from kumon/master * add upstream check & bugfix * add example of git-sync * upstream is used by default * Merge pull request #497 from JanSchulz/win_inst2 * add git-sync * Merge pull request #499 from tj/add-bsd-installation * Add BSD installation instructions. * installation.md: Update information about column.exe * install.cmd: add a check for write rights to the install folder * install.cmd: properly escape the ! in the shebang line * Merge pull request #496 from JanSchulz/win_inst * Make the win installer more robust * Merge pull request #494 from apjanke/fix-git-repo-inclusion * Merge pull request #495 from JanSchulz/patch-1 * Update Installation.md * Makefile: fix inverted list of commands that use is_git_repo * Add Gitter badge. * Bump version to 4.1.0-dev. 4.0.0 / 2015-12-28 ================== * Add David Rogers to AUTHORS. * Merge pull request #481 from al-the-x/multi-file-touch * Better USAGE message * Touch multiple files supplied * Use `$@` instead of `$*` re #467 * Update AUTHORS. * Merge pull request #490 from apjanke/etc-under-prefix * installation: put $SYSCONFDIR (/etc) under $PREFIX by default * Merge pull request #489 from apjanke/customize-etcdir * Makefile: allow customizing of SYSCONFDIR (/etc) location * Merge pull request #488 from apjanke/git-clear-shebang * Fix missing shebang in git-clear and missing +x on others * Update all man pages. * Merge pull request #479 from JanSchulz/global_gitignore * Merge pull request #448 from Lee-W/master * Add more info how to set global gitignore * Regenerate git-changelog man pages (.html and .1) for #471. * Merge pull request #471 from JanSchulz/merge-changelog * git-changelog: option to only use merges * Merge pull request #469 from JanSchulz/windows-install * Merge pull request #468 from spacewander/use-real-purplish * Use the default installation path in install.cmd * use real purplish * Merge pull request #466 from anarcat/master * Merge pull request #465 from spacewander/fix-color * add simple sed command * disable color if the output is not printed to tty * replace wildcard '?' to literal '?' * git-scp: use portable terminal escape sequences * Merge pull request #460 from apjanke/summary-defensive-locale * Merge pull request #458 from apjanke/makefile-refactor-libs * Merge pull request #459 from apjanke/effort-portable-colors * git-summary: protect against character encoding issues with LC_ALL=C * git-effort: use portable terminal escape sequences * Makefile: refactor is-git-repo inclusion logic * Merge pull request #454 from apjanke/makefile-escape-mktemp * Makefile: escape $ used inside eval as shell variable * Merge pull request #453 from jhnns/pr-url * Add possibility to also checkout pull requests based on GitHub urls * Merge pull request #452 from akimd/summary-locale * summary: beware of locale issues, and pass options to line-summary * Merge pull request #443 from Natim/patch-1 * Merge pull request #444 from spacewander/install_without_alias * Merge pull request #446 from ssssam/fix-active-days * Merge pull request #447 from RichardLitt/patch-1 * Update git-ignore-io mannual * Replace "export" option with "replace" in git-ignore-io * Remove exclamation mark * Remove warning when search without word. * Fix typo * Add warning when there is not argument after search, append and export * Fix ~/.gi_list not exist problem * Alphabetized list * effort, summary: Correctly estimate the number of active days * Merge pull request #445 from nicolaiskogheim/straighten-up-effort * effort: change order of arguments to function * effort: add usage message * effort: More robust argument parsing * add alias conflict prompt * Merge pull request #440 from spacewander/features/feature-alias * Add full name for list option * Fix usage error * Make sure git-authors doesn't return twice the same one. * update git-feature docs * add alias to git-feature * Modify print_last_modified_time to make it Linux compatible * Merge pull request #441 from spacewander/features/remove-checkout * Merge branch 'master' of https://github.com/Lee-W/git-extras * Fix doc error for git-ignore-io * Fix doc error for git-ignore-io * Remove redundant \n in tr * Not to update list each time git-ignore-io is executed * Refactor git-ignore-io and remove .gitignore * Update manual and description in Commands * remove duplicate checkout * Generate manual using ronn for git-ignore-io * Finish manual for git-ignore-io * Fix typo * Add description to Commands.md for git-ignore-io * Implement search function or git-ignore-io * Remove help from git-ignore-io * Init gitignore and ignore vim osx temp files * Merge gi_extension project into git extras as git-ignore-io * Merge pull request #436 from nwinkler/patch-1 * Merge pull request #437 from nwinkler/patch-2 * Fixed typo in install.sh * Updated documentation for git-ignore * Merge pull request #435 from nwinkler/patch-1 * Added details to git-pr documentation * Merge pull request #433 from grindhold/git-clear * made more precise security-question. * more concise implementation of git-clear * Fix typo in variable name * added git-clear to Commands.md * added manpage for git-clear * implemented git-clear * Merge pull request #432 from stevemao/patch-1 * fix link of `git feature|refactor|bug|chore` * Merge pull request #425 from nicolaiskogheim/makefile-fix * Mark default task as .PHONY * Merge pull request #430 from spacewander/git-extras * make it possible to update via `git extras` * Merge pull request #428 from spacewander/update-commands * Merge pull request #429 from nicolaiskogheim/merge-into-ff-only * merge-into: change --ff option to --ff-only. fix #421 * update Commands.md * Merge pull request #411 from Natim/add-psykorebase-command * Improve man page presentation. * Add documentation. * Merge pull request #426 from spacewander/update-for-new-version * change 'search-term' to 'search-pattern' * abort git-alias when too many arguments given. * Merge pull request #423 from nicolaiskogheim/effort-paths * Merge pull request #424 from nicolaiskogheim/fork-docs * Merge pull request #422 from nicolaiskogheim/effort-bugfix * effort docs: add note about omitting unsorted results * effort docs: add example with directories * effort docs: filename -> path * effort docs: Adjust numbers in example * effort: rename 'file' to 'path' to be more accurate * Set default make task to be install * fork docs: change SSH to HTTPS in example * effort: fix active days always 1 * Merge pull request #419 from nicolaiskogheim/git-guilt * Merge pull request #420 from nicolaiskogheim/git-summary * line-summary: 'function f{...' -> 'f() {...' * line-summary: add missing quotation marks * line-summary: tighten regex * summary docs: Remove --line example * summary docs: explain relation to git-line-summary * summary docs: use correct order of arguments * guilt: remove --help option * guilt: document call without arguments * guilt docs: Capitalize letters * guilt: Adds simplified example * Merge pull request #418 from nicolaiskogheim/fork-bugfix * fork: http-urls had colon instead of slash * Merge pull request #416 from nicolaiskogheim/fork-docs * Merge pull request #415 from nicolaiskogheim/contrib-docs * fork: original->upstream in docs * contrib: update docs * Merge pull request #414 from nicolaiskogheim/alias-docs * alias: docs * Add completion for git-psykorebase. * Create a bash version of git-psykorebase — Fixes #411 * Merge pull request #409 from nicolaiskogheim/refactor-alias * alias: polish the docs * alias: bugfix * Merge pull request #408 from nicolaiskogheim/refactor-contrib * contrib: refactor, and conform to git * Merge pull request #405 from nicolaiskogheim/fix-filenames-with-spaces * Merge pull request #404 from nicolaiskogheim/freebsd-fix * Merge pull request #406 from nicolaiskogheim/portable-msysgit * git-alias: use sed insted of colrm * git-changelog: use cp instead of mv * git-extras: use git-help instead of man * add install script for PortableGit(msysgit) * Quote variables bc of filenames with spaces * Guard against 'seq 0' * Fix error on FreeBSD with process substitution * Pass --import-functions if required * Merge pull request #403 from andreicristianpetcu/master * effort: documentation for git effort --since #326 * Merge pull request #401 from nicolaiskogheim/effort-above-error-on-NaN * effort: error on bad value to --above * Merge pull request #400 from nicolaiskogheim/fix-off-by-one * Merge pull request #391 from nicolaiskogheim/effort-limit-commits * Merge pull request #388 from chernjie/release * Merge pull request #398 from nicolaiskogheim/git-graft * Merge pull request #399 from nicolaiskogheim/git-archive-file * archive-file: cleaner way to get current branch * graft: Require destination branch. Fix #23 * effort: don't count untouched files * Add info about new options to man pages * Add completion for more options to effort * Do proper argument parsing * effort: allow sending options to log. Fix #326 * Merge pull request #396 from tocker/bug/changelog-catch-head * Catch "HEAD -> master" when creating the changelog * Merge pull request #394 from markeissler/changelog-signal-trap * Remove unused var. * Merge pull request #390 from nicolaiskogheim/effort-color-relative-to-above * Handle signals in git-changelog. * Meke coloring respect --above. Fix 74 * Merge pull request #392 from nicolaiskogheim/WIP-effort-parallelize * Avoid spawning subshell * Remove unnecessary call to cat * perf: reduce calls to git log * Parallelize git-effort with xargs * Alter options to git log. Remove pipe * cd man && ./manning-up.sh && git diff --stat | grep ' 2 ' | awk '{print }' | xargs git checkout -- * Merge pull request #386 from rstacruz/patch-2 * Use https for git-fork * Merge pull request #385 from gisphm/master * added windows installation section in the Installation.md * format install.cmd * add install.cmd for installation on windows * Merge pull request #383 from Somasis/master * Makefile: Use a more portable mktemp invocation * Using shorter URL * Merge pull request #381 from spacewander/master * installation with curl and bash * Merge pull request #380 from spacewander/master * keep installation silent * Merge pull request #378 from spacewander/master * update installation in `git-extras update` * Merge pull request #377 from go2null/master * FIXes location of `--` for `grep` * FIXes 'mktemp' to work again on Linux * Merge pull request #373 from zlx/feature/document_line_summary * Document for git-line-summary * Merge pull request #372 from spacewander/patch-1 * install the latest release version of git-extras * Merge pull request #370 from phigoro/master * git-effort: replace "wc | cut" with "wc | awk" * Merge pull request #369 from phigoro/master * align hashbang of git-guilt & git-merge-into * Merge pull request #368 from zlx/feature/strong_line_summary * Fix Fatal for git-line-summary * Merge pull request #365 from rkennedy/bug-ignore-regex2 * Don't treat ignored patterns as regexps 3.0.0 / 2015-04-27 ================== * Merge pull request #363 from chernjie/pre-release-docs * run pre-release ./manning-up.sh * Merge pull request #362 from chernjie/git-scp * Updated documentation for git-scp and slight feature change * Merge pull request #359 from chernjie/docs * Merge pull request #361 from markeissler/better-changelog-fixes * Fix git tag substring extraction for bash 3.2. * Merge pull request #360 from spacewander/master * Merge pull request #355 from markeissler/better-changelog-fixes * Merge branch 'better-changelog-fixes' of github.com:markeissler/git-extras into better-changelog-fixes * add support for git version below 2.2.0 * Fix git-changelog for compatibility for bash<4. Fixes #337, #338 * Merge pull request #1 from spacewander/better-changelog-fixes * correct the broken regex * Rearrange documentation links, see #358 * Merge branch 'https://github.com/tj/git-extras.wiki/master' into docs, see #358 * Merge pull request #357 from imsky/merge-repo * git-merge-repo * git merge-repo * add wiki for git-guilt * add support for git version below 2.2.0 * Fix git-changelog for compatibility for bash<4. Fixes #337, #338 * Merge pull request #349 from spacewander/git-guilt * fix indentation errors in git guilt * Merge pull request #345 from spacewander/git-guilt * Hope to fix #341 * Merge pull request #344 from Somasis/master * use argument separator for usages of `grep` which can choke on weird input * helper/reset-env: helper to prevent GREP_OPTIONS from causing issues * Merge pull request #342 from spacewander/git-guilt * add docs for git guilt * add git-guilt * Merge pull request #340 from spacewander/git-effort * sort unless there is only one item * Merge pull request #333 from paulschreiber/merged-branches * add show-merged-branches and show-unmerged-branches * Merge pull request #334 from paulschreiber/dont-delete-svn-branch * when deleting merged branches, preserve "svn" branch for git-svn Fixed #328 * Merge pull request #324 from chernjie/git-ignore * Merge pull request #331 from markeissler/better-changelog-fixes * Fix tag trapping when HEAD and tag point to same commit. * Fix gitflow commit history output. * Merge pull request #327 from markeissler/better-changelog-completion * Updated bash completions for better-changelog. * Update docs for revised git-changelog. * Merge pull request #325 from markeissler/better-changelog * Complete rewrite to support commit ranges for pretty and list output. * Support ~ in add_patterns for git-ignore * Support ~ in show git-ignore * add wiki for git-merge-into * Merge pull request #323 from spacewander/master * add docs for git-merge-into * add merge-into to merge two branches quickly * Merge pull request #322 from andrewsomething/master * git-fresh-branch: Check for changes and prompt for input before nuking. (Issue: #142) * Merge pull request #308 from spacewander/git-utility * Merge pull request #312 from RichardLitt/feature/concat-extra-feature-names * Merge pull request #320 from cironunes/gh-pages-fix * fix gh-pages to stash and don't delete files * Merge pull request #319 from pfctgeorge/allow-empty-when-setup * Allow empty initial commit when setup repo. * Merge pull request #317 from jykntr/master * git-summary correctly displays project name * git scp #300 * Merge pull request #316 from code42day/changelog-config * changelog: add git-config support for format and log options * Merge pull request #315 from code42day/consistent-editor * use standard git editor in git-authors & git-changelog * Merge pull request #314 from snowyu/feature/custom-commit-message * + custom commit message options supports * Merge pull request #300 from chernjie/git-scp * Merge pull request #313 from wooorm/bug/fix-missing-closing-brace * Fix missing closing curly brance in `bash_completion.sh` * Added in option to concat extra feature names * link to git delta * git delta usage * Merge pull request #310 from imsky/git-delta * git-delta * Add git-authors * Merge pull request #309 from wooorm/feature/add-git-authors * Add git-authors * Updated Commands (markdown) * Updated Commands (markdown) * Updated Commands (markdown) * Updated Commands (markdown) * Updated Commands (markdown) * tj#300 Added bash completion * extra mktemp into git_extra_mktemp * Merge pull request #307 from ckhall/feature/add_git_chore_workflow * adding git-chore * Merge pull request #306 from spacewander/master * add enough X to fix #303. GNU mktemp requires at least three X in the last part of template. * Merge pull request #304 from wooorm/git-ignore-typo * Fix typo in in `git ignore` message * symlink git-rscp to git-scp * Avoid duplicating asterisk. * Updated License. * Fix link to git feature command * path argument can not be optional in `rscp`; add more docs * OMG a spelling mistake\! * Merge pull request #301 from raeffs/master * updated documentation because git-squash does no longer delete source-branch * Updated man page for git-scp * First RFC documentation * Merge pull request #299 from jonanp/git-delete-branch * When deleting a branch check if git has config. * Added a footer. * Merge pull request #298 from timfeirg/master * remove stuff from readme & form a list * add a few keywords * some remaining dashes * roughly finished * Updated Commands (markdown) * Updated Commands (markdown) * Updated Commands (markdown) * gonna use the clean sub command for each command explanation * adding links turn out to be a pain, go to sleep * add commands page link * add commands page, all copy & paste * add screencasts * copy from readme * Updated Install (markdown) * Created Install (markdown) * adapted a more generic, customizable and friendly script * Copy from git-goth https://github.com/chernjie/git-goth * Initial Home page * Merge pull request #296 from spacewander/add-completion * add more bash completion functions * Merge pull request #294 from GuillaumeSeren/feature/git-missing-add-ref-completion * Add ref completion to git-missing. * Merge pull request #293 from tj/revert-291-ignore-man-generated-files * Revert "Ignore *.html and *.1 auto-generated files in man/" * Merge pull request #292 from RasmusWL/make-handle-missing-man * make will not assume man pages already exists * Merge pull request #291 from jguenther/ignore-man-generated-files * Ignore man/git-*.html and man/git-*.1 * Remove auto-generated files man/git-*.html and man/git-*.1 * Merge pull request #226 from tsldh/master * added changelog to release as optional flag * Merge pull request #289 from mavant/feature/mktemp * Use mktemp for temporary file creation. * Merge pull request #288 from dead-horse/release-hook * make release hook more flexible * Merge pull request #287 from benjaminparnell/master * added --no-color to git-delete-merged-branches * More portable she-bangs. * Merge pull request #283 from e28eta/patch-1 * Use process-specific tmp file and clean up on exit * Merge pull request #281 from emilkje/patch-1 * Merge pull request #280 from valeriangalliat/feature/git-info-posix * Update Readme.md * git-info: POSIX compliance * Merge pull request #278 from tj/delete-submodule-fix * Fixes #277 * Merge pull request #276 from spacewander/master * modify the behavior of git-ignore, now it will cd root to find .gitignore 2.2.0 / 2014-11-18 ================== * Update `mktemp` command to work on Mac OS X * Merged pull request #273 from spacewander/master * New command 'git root' to show the path to root of repo * Merged pull request #271 from bohnman/git-rename-tag-fix * Merged pull request #272 from spacewander/master * Correct the format of git-rebase-patch.md. * Replaced visionmedia/git-extras to tj/git-extras * Merged pull request #270 from kevinawoo/hotfix/git-locked * Added git-locked to check what files have been locked. * Merged pull request #268 from GuillaumeSeren/bug/git-missing * Fixed #267, git-missing did not catch branch name. 2.1.0 / 2014-10-13 ================== * Fixes #266 * Merge pull request #264 from jamesmanning/patch-1 * fixed descriptions: match required/optional params * Merge pull request #263 from Yitsushi/bug/180-does-not-check-out-branch-if-it-already-exists * fix #180 and #232 feature|bug|refactor checkout * Merge pull request #262 from rstacruz/gh-259-git-pr * Implement git-pr * Merge pull request #261 from sanusart/master * FIX: representation of git-info * Merge pull request #260 from brandondrew/patch-1 * import changes *from* a branch * Merge pull request #258 from spacewander/master * use mixin to add 'is git repo' check for some commands * Merge pull request #255 from sanusart/master * Bump version in `bin/git-extras` * Changelogs for version 2.0.0 2.0.0 / 2014-09-20 ================== * Merge pull request #254 from spacewander/master * add welcome in git-repl * Merge pull request #253 from tailored-tunes/master * Added option to specify base * Merge pull request #252 from sorbits/patch-1 * Update homebrew URL and remove ‘buggy’ label * Merge pull request #250 from sanusart/master * ADD: git-reset-file * Merge pull request #248 from rstacruz/patch-1 * Readme: document git-delete-merged-branches * Merge pull request #247 from visionmedia/perm_fix * File perms fix. * Merge pull request #242 from sanusart/fix_feature_refactor_bug * Merge pull request #244 from toksea/patch-1 * Merge pull request #243 from sanusart/issue234 * Fix wrong git-info heading level in Readme.md * Revert 2 commits to `git-changelog` * Fix feature|refactor|bug testing argument for string length * Merge pull request #240 from egrim/bug/delete-merged-branches-clobbers-master * Update docs to match `git-delete-merged-branches` behavior * Exempt `master` from deleted branches * Merge pull request #239 from bruno-/refactor_git_squash * Refactor and improve `git squash` * Merge pull request #238 from techjacker/feature/git-fork * add git-fork * Merge pull request #236 from jbnicolai/align-authors-git-summary * Uses column -t to align summary output in a table. * Merge pull request #221 from zlx/feature/git-summary-doc * Merge pull request #224 from StewartJarod/patch-1 * Merge pull request #189 from rhacker/patch-1 * Merge pull request #235 from sanusart/patch-1 * FIX: check if un-pushed commits * Merge pull request #202 from julionc/protecting-files * Update Readme.md with lock and unlock commands * git-unlock Unlock local files in git repository * git-lock Lock files in git repository * Merge pull request #100 from niklasf/rebase-patch * Add git-rebase-patch * Merge pull request #200 from emkay/patch-1 * Merge pull request #195 from carlcasbolt/patch-1 * Merge pull request #181 from zeroDivisible/feature/handle-misspellings * Merge pull request #193 from pzelnip/git-setup-no-overwrite * Merge pull request #183 from chernjie/master * Merge pull request #220 from sanusart/master * Merge pull request #63 from justone/git_missing * Merge pull request #173 from accerqueira/master * Merge pull request #194 from makeusabrew/patch-1 * Merge pull request #216 from stephenmathieson/fix/changelog-large-versions * Merge pull request #188 from twolfson/dev/add.multi.delete.squashed * Merge pull request #219 from jhoffmann/patch-1 * Merge pull request #222 from jsipprell/pull/filenames-containing-spaces * Merge pull request #223 from mwoc/master * Merge pull request #229 from yggdr/master * Merge pull request #231 from petersohn/master * Make git-obliterate work if there are whitespaces in filename * invoke bash via /usr/bin/env for portability * improved Makefile with BINPREFIX * fixed Makefile uninstall target for man files * Letter spacing in author list * Use two-space indents for log entry output, so it again is debian changelog compatible (as before commit 1235e4a5) * git effort: handle filenames containing whitespace cleanly * Add line-summary as an options --line & doc * Add check for no changes in the tree (no sub-modules) * Update Readme.md * Fix changelog formatting for large version numbers * removing `git promote` * Update Readme.md * Fix git-squash typo * Address issue #190, git-setup should test for existing .git in target directory * Add comment for the code * Added multi-delete for git-delete-branch and git-delete-tag Correcting typos Compiled latest documentation Applying changes from delete-tag to delete-branch for consistency Removed unnecessary string quotes (thanks `git` ref design) and everything works Tags are not being found with string concatenation Updated delete-tag to accept multiple tags Corrections for delete-branch Updating docs for delete-tag Added 'Todd Wolfson' to AUTHORS Updated documentation for delete-branch Moved deletions to concatenate strings and delete in one fell swoop Reworking delete-branch to delete multiple branches in series * git-create-branch: bug fix for branch creation use HEAD instead of origin * changed the code for git bug|feature|refactor to only accept single argument when not finishing a bug|feature|refactor. This is an easy solution to avoid misspelings of the word 'finish' * allow options to be passed through to git log * adding git-missing command 1.9.1 / 2014-06-21 ================== * add --no-merges option to changelog * fix git-changelog errors when multiple files match change|history * fix git-changelog errors on first usage * update git-changelog docs for --no-merges option 1.9.0 / 2013-06-18 ================== * git-squash: add --me flag to flatten the current branch * Make repository_age() "history rewrite safe" * add git-line-summary 1.8.0 / 2013-05-15 ================== * add `git-archive-file(1)` * add --tag support to git-changelog(1) to reduce manual editing * add !cmd support to git-repl * change: git-delete-merged-branches: use -D instead of delete-branch 1.7.0 / 2012-06-11 ================== * Added repo age to `git-summary` [muhtasib] 1.6.0 / 2012-06-04 ================== * Added `git-rename-tag` * Added current branch to `git-repl` * Fixed: use dirname for `git extras update` [wilmoore] 1.5.1 / 2012-03-15 ================== * Reverted 1.5.0 changes, breaks git-changelog 1.4.0 / 2012-02-08 ================== * Added: allow files to be passed to `git-effort(1)`. Closes #71 * Added: hide/show cursor for `git-effort(1)` * Changed: color `git-effort(1)` commits / active days independently 1.3.0 / 2012-02-08 ================== * Added active days to `git-effort(1)` output 1.2.0 / 2012-02-08 ================== * Added a greater color range to `git-effort(1)` * Added `--above ` to `git-effort(1)` 1.1.0 / 2012-02-07 ================== * Added `git-effort(1)` (not yet complete) 1.0.0 / 2012-02-04 ================== * Added `git-squash BRANCH [MSG]` to merge as a single commit 0.9.0 / 2012-01-15 ================== * Added bash completion support [jweslley] 0.8.1 / 2011-12-30 ================== * Removed `git-promote` 0.8.0 / 2011-12-08 ================== * Added `pre-release` and `post-release `hooks to git-release * Added `git-promote` * Fixed: "git extra update" errors when pwd includes whitespace 0.7.0 / 2011-08-24 ================== * Added percentages to `git-summary` 0.6.0 / 2011-06-24 ================== * Added `git-back` command for soft undos [Kenneth Reitz] 0.5.1 / 2011-05-20 ================== * revert `git-ignore` but retain argc == 0 as showing .gitignore contents * revert broken `git-release` 0.5.0 / 2011-05-19 ================== * Added `git-alias` [jweslley] * Added `git-create-branch` [jweslley] * Fixed one-liner due to `git extras update` change * Fixed; `git-setup` creates a directory if the provided one does not exist [jweslley] * Fixed; `git-setup` support for directories with spaces [jweslley] * Fixed; `git-ignore` with no args no longer fails if `.gitignore` does not exist [jweslley] 0.4.1 / 2011-04-05 ================== * Changed; `git-graft` now defaults to current branch instead of master [Kenneth Reitz] 0.4.0 / 2011-04-05 ================== * Added `git-refactor` * Added `git-bug` * Added `git-feature` 0.3.0 / 2011-03-29 ================== * Added `git-pull-request` 0.2.0 / 2011-03-27 ================== * Added `git-extras` * Added __LICENSE__ * Removed `git-extras-version`, use `git extras --version` * Removed `git-extras-update`, use `git extras update` * Changed; make sure to get the last chronological tag, instead of relying on the bogus `git tag` sorting. [guillermo] 0.1.0 / 2011-02-10 ================== * Added `gh-pages` command 0.0.7 / 2010-10-31 ================== * Added man pages. * Added `make clean`. * Added `make docs`. * Added -d -> -D. Closes #15. * Added git-delete-submodule for delete submodules easily. * Added; `git-ignore` now shows the contents of _./.git-ignore_ if no args are present. 0.0.6 / 2010-10-22 ================== * Added command `git-touch`. * Use a shallow clone in `git-update-extras`. * Create History.md if git-changelog can't find a target. Fixes #14. 0.0.5 / 2010-10-08 ================== * Added `git-delete-submodule`. * Added; `git-ignore` without pattern shows .gitignore contents. * Added; `git-setup` argument is now optional, defaulting to the CWD. * Added REPL alias "ls" as ls-files. 0.0.4 / 2010-09-10 ================== * Added: `git-delete-branch`: Also delete the remote branch. * Added `git-summary` commitish support. * Added `git-graft` dest branch default of _master_. * Added `git-setup`. * Added `git-graft`. * Added `git-undo` for removing recent commits. * Fixed `git-delete-branch`: Don't fail if the local branch doesn't exist. * Fixed __PREFIX__ to respect env vars. * Fixed shift in `git-count`. 0.0.3 / 2010-08-27 ================== * Added `git-extras-version`. * Added `git-update-extras`. * Fixed `git-contrib` issue when the username is in a commit msg. * Fixed: delete remote tag only if local was deleted. * Fixed: delete remote branch only if local was deleted. * Fixed printing of authors for git-summary's on Ubuntu. * Fixed: read doesn't have the -e option in SH on my machine at least. 0.0.2 / 2010-08-24 ================== * Added `git-summary`. * Added `git-commits-since`. * Added `git-repl`. * Added `git-delete-tag`. * Added `git-delete-branch`. * Added `git-contrib`. * Fixed handling off spaces in contributor's name for `git-contrib`. * Fixed spaces in `git-release` names/numbers. * Fixed readme. 0.0.1 / 2010-08-05 ================== * Docs for `git-ignore`. Closes #3. * Merge branch 'ignore'. * Added `git-ignore`. * Readme typo. * Fixed in docs. * Install docs. * Merge branch 'release'. * Added `git-release`. * Fixed readme. * Readme. * Passing args to git shortlog. * Added --all support to git-count. * Initial commit. git-extras-4.5.0/Installation.md000066400000000000000000000067111324217456300166060ustar00rootroot00000000000000# Installing git-extras ## Installing with a package manager ### Debian ```bash $ sudo $apt_pref update $ sudo $apt_pref install git-extras ``` ### Fedora ```bash $ sudo dnf install git-extras ``` ### RHEL/CentOS (requires [EPEL](https://fedoraproject.org/wiki/EPEL)) ```bash $ sudo yum install git-extras ``` ### Ubuntu ```bash $ sudo apt-get install git-extras ``` ### Nix/NixOS ```bash $ nix-env -i git-extras ``` ### Mac OS X with Homebrew ```bash $ brew install git-extras ``` Installing from Homebrew will not give you the option omit certain `git-extras` if they conflict with existing git aliases. To have this option, build from source. ### Windows First, please install `Git for Windows 2.x` from 'https://github.com/git-for-windows/git/releases'. Second, clone the `git-extras` repo into any folder you like. ```bash git clone https://github.com/tj/git-extras.git # checkout the latest tag (optional) git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) ``` After that, execute the `install.cmd` in the command prompt. If you installed git as admin, you need to run this prompt as admin, too. Per default, it finds a `Git for Windows 2.x` if it's in the path (first path in `where git.exe` wins) or installed in the default location `%ProgramFiles%\Git`. The fallback is `C:\SCM\PortableGit`. If you didn't install git into one of these dirs, you have to supply the path for the install location, e.g. if git is installed in `c:\git`: ```batch install.cmd "C:\git" ``` Last, to use `git line-summary`, `git summary` and `git ignore-io`, you need to copy `column.exe` from a [msys2][1] installation from `folder-your-msys2-installed/usr/bin` to `folder-your-git-installed/usr/bin` or wait for git 2.7.1, which will include column.exe. ### BSD Use the instructions to build from source below. Make sure you are using `gmake` (GNU `make`) instead of `make`. ## Building from source Obtain the git-extras source by cloning [its GitHub repo](https://github.com/tj/git-extras.git) or downloading a tarball of a [release](https://github.com/tj/git-extras/releases). Then install it by doing `make install` from the source tree. ```bash $ git clone https://github.com/tj/git-extras.git $ cd git-extras # checkout the latest tag $ git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) $ [sudo] make install ``` By default, git-extras is installed under `/usr/local`. To install it at an alternate location, specify a `PREFIX` when calling `make`. ```bash # Non-root users can install under their home directory make install PREFIX=$HOME/software # For third-party software kept under /opt make install PREFIX=/opt ``` If you want to relocate the bulk of the installation but still have configuration files installed to the system `/etc` dir or other alternate location, you can specify `SYSCONFDIR` in addition to `PREFIX`. ``` $ sudo make install PREFIX=/usr/local SYSCONFDIR=/etc ``` See the Makefile for details on advanced configuration options. ## Installing from network One-liner: ```bash curl -sSL http://git.io/git-extras-setup | sudo bash /dev/stdin ``` ## Updating If you installed git-extras with a package manager, use that package manager's tools to update it. If you installed git-extras from source, you can run `git-extras update` to update it to the latest release. Be aware that this may lose any configuration options you specified during the original installation. Enjoy `git-extras`! [1]: http://sourceforge.net/projects/msys2/ git-extras-4.5.0/LICENSE000066400000000000000000000021331324217456300146220ustar00rootroot00000000000000(The MIT License) Copyright (c) 2010 TJ Holowaychuk and Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. git-extras-4.5.0/Makefile000066400000000000000000000061141324217456300152600ustar00rootroot00000000000000PREFIX ?= /usr/local BINPREFIX ?= "$(PREFIX)/bin" MANPREFIX ?= "$(PREFIX)/share/man/man1" SYSCONFDIR ?= $(PREFIX)/etc BINS = $(wildcard bin/git-*) MANS = $(wildcard man/git-*.md) MAN_HTML = $(MANS:.md=.html) MAN_PAGES = $(MANS:.md=.1) CODE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) INSTALL_VIA ?= source # Libraries used by all commands LIB = "helper/reset-env" "helper/git-extra-utility" COMMANDS = $(subst bin/, , $(BINS)) default: install docs: $(MAN_HTML) $(MAN_PAGES) install: @if [ "$(INSTALL_VIA)" = brew ]; then \ git apply brew-release.patch || { echo "Can't apply brew release patch"; exit 1; } \ fi @mkdir -p $(DESTDIR)$(MANPREFIX) @mkdir -p $(DESTDIR)$(BINPREFIX) @echo "... installing bins to $(DESTDIR)$(BINPREFIX)" @echo "... installing man pages to $(DESTDIR)$(MANPREFIX)" $(eval TEMPFILE := $(shell mktemp -q $${TMPDIR:-/tmp}/git-extras.XXXXXX 2>/dev/null || mktemp -q)) @# chmod from rw-------(default) to rwxrwxr-x, so that users can exec the scripts @chmod 775 $(TEMPFILE) $(eval EXISTED_ALIASES := $(shell \ git config --get-regexp 'alias.*' | awk '{print "git-" substr($$1, 7)}')) @$(foreach COMMAND, $(COMMANDS), \ disable=''; \ if test ! -z "$(filter $(COMMAND), $(EXISTED_ALIASES))"; then \ read -p "$(COMMAND) conflicts with an alias, still install it and disable the alias? [y/n]" answer; \ test "$$answer" = 'n' -o "$$answer" = 'N' && disable="true"; \ fi; \ if test -z "$$disable"; then \ echo "... installing $(COMMAND)"; \ head -1 bin/$(COMMAND) > $(TEMPFILE); \ cat $(LIB) >> $(TEMPFILE); \ if ! grep "$(COMMAND)" not_need_git_repo >/dev/null; then \ cat ./helper/is-git-repo >> $(TEMPFILE); \ fi; \ if grep "$(COMMAND)" need_git_commit >/dev/null; then \ cat ./helper/has-git-commit >> $(TEMPFILE); \ fi; \ tail -n +2 bin/$(COMMAND) >> $(TEMPFILE); \ cp -f $(TEMPFILE) $(DESTDIR)$(BINPREFIX)/$(COMMAND); \ fi; \ ) @if [ -z "$(wildcard man/git-*.1)" ]; then \ echo "WARNING: man pages not created, use 'make docs' (which requires 'ronn' ruby lib)"; \ else \ cp -f man/git-*.1 $(DESTDIR)$(MANPREFIX); \ echo "cp -f man/git-*.1 $(DESTDIR)$(MANPREFIX)"; \ fi @mkdir -p $(DESTDIR)$(SYSCONFDIR)/bash_completion.d cp -f etc/bash_completion.sh $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/git-extras @echo "" @echo "If you are a zsh user, you may want to 'source $(CODE_DIR)/etc/git-extras-completion.zsh'" \ "and put this line into ~/.zshrc to enable zsh completion" man/%.html: man/%.md ronn \ --manual "Git Extras" \ --html \ --pipe \ $< > $@ man/%.1: man/%.md ronn -r \ --manual "Git Extras" \ --pipe \ $< > $@ uninstall: @$(foreach BIN, $(BINS), \ echo "... uninstalling $(DESTDIR)$(BINPREFIX)/$(notdir $(BIN))"; \ rm -f $(DESTDIR)$(BINPREFIX)/$(notdir $(BIN)); \ ) @$(foreach MAN, $(MAN_PAGES), \ echo "... uninstalling $(DESTDIR)$(MANPREFIX)/$(notdir $(MAN))"; \ rm -f $(DESTDIR)$(MANPREFIX)/$(notdir $(MAN)); \ ) rm -f $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/git-extras clean: docclean docclean: rm -f man/*.1 rm -f man/*.html .PHONY: default docs clean docclean install uninstall git-extras-4.5.0/Makefile.msys000066400000000000000000000016351324217456300162550ustar00rootroot00000000000000MANPREFIX ?= /doc/git/html BINS = $(wildcard bin/git-*) MANS = $(wildcard man/git-*.md) MAN_HTML = $(MANS:.md=.html) install: @mkdir -p $(DESTDIR)$(MANPREFIX) @mkdir -p $(DESTDIR)/bin @echo "... installing bins to $(DESTDIR)/bin" @echo "... installing man pages to $(DESTDIR)$(MANPREFIX)" @$(foreach BIN, $(BINS), \ echo "... installing `basename $(BIN)`"; \ cp -f $(BIN) $(DESTDIR)/$(BIN); \ ) cp -f man/git-*.html $(DESTDIR)$(MANPREFIX) @mkdir -p $(DESTDIR)/etc/bash_completion.d cp -f etc/bash_completion.sh $(DESTDIR)/etc/bash_completion.d/git-extras uninstall: @$(foreach BIN, $(BINS), \ echo "... uninstalling $(DESTDIR)/$(BIN)"; \ rm -f $(DESTDIR)/$(BIN); \ ) @$(foreach MAN, $(MAN_HTML), \ echo "... uninstalling $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`"; \ rm -f "$(DESTDIR)$(MANPREFIX)/`basename $(MAN)`"; \ ) rm -f $(DESTDIR)/etc/bash_completion.d/git-extras .PHONY: install uninstall git-extras-4.5.0/Readme.md000066400000000000000000000011121324217456300153300ustar00rootroot00000000000000# Git Extras [![Gitter](https://img.shields.io/gitter/room/tj/git-extras.svg?style=flat-square)](https://gitter.im/tj/git-extras) Little git extras. ## Screencasts Just getting started? Check out these screencasts: * [introduction](https://vimeo.com/45506445) -- covering git-ignore, git-setup, git-changelog, git-release, git-effort and more ## Installation See [Installation](Installation.md) page. ## Commands Go to [Commands](Commands.md) page for basic usage and examples. __GIT utilities__ -- repo summary, repl, changelog population, author commit percentages and more git-extras-4.5.0/bin/000077500000000000000000000000001324217456300143665ustar00rootroot00000000000000git-extras-4.5.0/bin/git-alias000077500000000000000000000007511324217456300161710ustar00rootroot00000000000000#!/usr/bin/env bash usage() { cat < # show aliases matching pattern or: git alias # alias a command HERE } case $# in 0) git config --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort ;; 1) git alias | grep -e "$1" ;; 2) git config --global alias."$1" "$2" ;; *) >&2 echo "error: too many arguments." && usage && exit 1 ;; esac git-extras-4.5.0/bin/git-archive-file000077500000000000000000000016641324217456300174420ustar00rootroot00000000000000#!/usr/bin/env bash # extract current branch name BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) # get name of the most top folder of current directory, used for the # output filename ARCHIVE_NAME=$(basename $(pwd)) if [[ $BRANCH = tags* ]]; then BRANCH=$(git describe) echo Building for tag \"$BRANCH\" FILENAME=$ARCHIVE_NAME.$BRANCH.zip else echo Building archive on branch \"$BRANCH\" # get a version string, so archives will not be overwritten when creating # many of them VERSION=$(git describe --always --long) # if not on master append branch name into the filename if [ "$BRANCH" = "master" ]; then FILENAME=$ARCHIVE_NAME.$VERSION.zip else FILENAME=$ARCHIVE_NAME.$VERSION.$BRANCH.zip fi fi # combine path and filename OUTPUT=$(pwd)/$FILENAME # building archive git archive --format zip --output $OUTPUT $BRANCH # also display size of the resulting file echo Saved to \"$FILENAME\" \(`du -h $OUTPUT | cut -f1`\) git-extras-4.5.0/bin/git-authors000077500000000000000000000017121324217456300165630ustar00rootroot00000000000000#!/usr/bin/env bash LIST=false NO_EMAIL=false FILE="" EDITOR=$(git var GIT_EDITOR) while [[ $# -gt 0 ]]; do case $1 in -l|--list ) LIST=true shift ;; --no-email ) NO_EMAIL=true shift ;; * ) break esac done if ! $LIST; then FILE=$1 if test "$FILE" = ""; then FILE=$(ls | egrep 'authors|contributors' -i|head -n1) if test "$FILE" = ""; then FILE='AUTHORS' fi fi fi # # list authors sorted by number of commits (descending). # authors() { if $NO_EMAIL; then # eamil will be used to uniq authors. git shortlog -sne | awk '{$1=""; sub(" ", ""); print}' | awk -F'<' '!x[$1]++' | awk -F'<' '!x[$2]++' \ | awk -F'<' '{gsub(/ +$/, "", $1); print $1}' else git shortlog -sne | awk '{$1=""; sub(" ", ""); print}' | awk -F'<' '!x[$1]++' | awk -F'<' '!x[$2]++' fi } # # authors. # if $LIST; then authors else authors >> $FILE test -n "$EDITOR" && $EDITOR $FILE fi git-extras-4.5.0/bin/git-back000077500000000000000000000003061324217456300157740ustar00rootroot00000000000000#!/usr/bin/env bash if test $# -eq 0; then git reset --soft HEAD~1 else if `echo $1 | grep -q [^[:digit:]]`; then echo "$1 is not a number" 1>&2 else git reset --soft HEAD~$1 fi fi git-extras-4.5.0/bin/git-bug000077500000000000000000000000721324217456300156510ustar00rootroot00000000000000#!/usr/bin/env bash ALIAS=bug git feature -a $ALIAS "$@" git-extras-4.5.0/bin/git-bulk000077500000000000000000000126041324217456300160350ustar00rootroot00000000000000#!/usr/bin/env bash invers=$(tput rev) reset=$(tput sgr0) txtbld=$(tput bold) bldred=${txtbld}$(tput setaf 1) # default option settings guardedmode=false singlemode=false allwsmode=false # # print usage message # usage() { echo 1>&2 "usage: git bulk [-g] ([-a]|[-w ]) " echo 1>&2 " git bulk --addworkspace " echo 1>&2 " git bulk --removeworkspace " echo 1>&2 " git bulk --addcurrent " echo 1>&2 " git bulk --purge" echo 1>&2 " git bulk --listall" } # add another workspace to global git config function addworkspace { git config --global bulkworkspaces."$wsname" "$wsdir"; } # add current directory function addcurrent { git config --global bulkworkspaces."$wsname" "$PWD"; } # remove workspace from global git config function removeworkspace { checkWSName && git config --global --unset bulkworkspaces."$wsname"; } # remove workspace from global git config function purge { git config --global --remove-section bulkworkspaces; } # list all current workspace locations defined function listall { git config --global --get-regexp bulkworkspaces; } # guarded execution of a git command in one specific repository function guardedExecution () { if $guardedmode; then echo -n "${invers}git $gitcommand${reset} -> execute here (y/n)? " read -n 1 -r ${reset} executing ${invers}git $gitcommand${reset}" && git $gitcommand } # check if the passed command is known as a core git command function checkGitCommand () { if git help -a | grep -o -q "\b${corecommand}\b"; then echo "Core command \"$corecommand\" accepted." else if git config --get-regexp alias | grep -o -q "\.${corecommand} "; then echo "Alias ${corecommand} accepted." else usage && echo "error: unknown GIT command: $corecommand" && exit 1 fi fi } # check if workspace name is registered function checkWSName () { while read workspace; do parseWsName "$workspace" if [[ $rwsname == "$wsname" ]]; then return; fi done <<< "$(echo "$(listall)")" # when here the ws name was not found usage && echo "error: unknown workspace name: $wsname" && exit 1 } # parse out wsname from workspacespec function parseWsName () { local wsspec="$1" rwsdir=${wsspec#* } rwsname=${wsspec#*.} && rwsname=${rwsname%% *} } # detects the wsname of the current directory function wsnameToCurrent () { while read workspace; do if [ -z "$workspace" ]; then continue; fi parseWsName "$workspace" if echo "$PWD" | grep -o -q "$rwsdir"; then wsname="$rwsname" && return; fi done <<< "$(echo "$(listall)")" # when here then not in workspace dir echo "error: you are not in a workspace directory. your registered workspaces are:" && \ wslist="$(echo "$(listall)")" && echo "${wslist:-''}" && exit 1 } # helper to check number of arguments function allowedargcount () { ( test "$paramcount" -ne "$1" ) && ( usage && echo 1>&2 "error: wrong number of arguments" && exit 1 ) } # execute the bulk operation function executBulkOp () { checkGitCommand if ! $allwsmode && ! $singlemode; then wsnameToCurrent; fi # by default git bulk works within the 'current' workspace listall | while read workspacespec; do parseWsName "$workspacespec" if [[ -n $wsname ]] && [[ $rwsname != "$wsname" ]]; then continue; fi eval cd "\"$rwsdir\"" local actual=$(pwd) echo "Executing bulk operation in workspace ${invers}$actual${reset}" eval find . -name ".git" | while read line; do local gitrepodir=${line::${#line}-5} # cut the .git part of find results to have the root git directory of that repository eval cd "\"$gitrepodir\"" # into git repo location local curdir=$(pwd) local leadingpath=${curdir#${actual}} echo "Current repository: ${leadingpath%/*}/${bldred}${curdir##*/}${reset}" guardedExecution eval cd "\"$rwsdir\"" # back to origin location of last find command done done } paramcount="${#}" # if no arguments show usage if [[ $paramcount -le 0 ]]; then usage; fi # parse command parameters while [ "${#}" -ge 1 ] ; do case "$1" in --listall|--purge) butilcommand="${1:2}" && break ;; --removeworkspace|--addcurrent|--addworkspace) butilcommand="${1:2}" && wsname="$2" && wsdir="$3" && break ;; -a) allwsmode=true ;; -g) guardedmode=true ;; -w) singlemode=true && shift && wsname="$1" && checkWSName ;; -*) usage && echo 1>&2 "error: unknown argument $1" && exit 1 ;; --*) usage && echo 1>&2 "error: unknown argument $1" && exit 1 ;; *) # git core commands butilcommand="executBulkOp" && corecommand="$1" && gitcommand="$@" && break ;; esac && shift done # check option compatibility if $allwsmode && $singlemode; then echo 1>&2 "error: options -w and -a are incompatible" && exit 1; fi # if single mode check the supplied workspace name if $singlemode; then echo "Selected single workspace mode in workspace: $wsname" && checkWSName; fi # check right number of arguments case $butilcommand in listall|purge) allowedargcount 1;; addcurrent|removeworkspace) allowedargcount 2;; addworkspace) allowedargcount 3;; esac $butilcommand # run user command git-extras-4.5.0/bin/git-changelog000077500000000000000000000401461324217456300170310ustar00rootroot00000000000000#!/usr/bin/env bash DEF_TAG_RECENT="n.n.n" GIT_LOG_OPTS="$(git config changelog.opts)" GIT_LOG_FORMAT="$(git config changelog.format)" [[ -z "$GIT_LOG_FORMAT" ]] && GIT_LOG_FORMAT=' * %s' GIT_MERGELOG_FORMAT="$(git config changelog.mergeformat)" [[ -z "$GIT_MERGELOG_FORMAT" ]] && GIT_MERGELOG_FORMAT=' * %s%n%w(64,4,4)%b' GIT_EDITOR="$(git var GIT_EDITOR)" PROGNAME="git-changelog" _usage() { cat << EOF usage: $PROGNAME options [file] usage: $PROGNAME -h|help|? Generate 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 and their content will be appended to the new output generated (unless the -p|--prune-old option is used). 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. OPTIONS: -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 -m, --merges-only Only uses merge commits (uses both subject and body of commit) -p, --prune-old Replace existing Changelog entirely with new content -x, --stdout Write output to stdout instead of to a Changelog file -h, --help, ? Show this message EOF } _error() { [ $# -eq 0 ] && _usage && exit 0 echo echo "ERROR: " "$@" echo } # _setValueForKeyFakeAssocArray() # /*! # @abstract Set value for key from a fake associative array # @discussion # Iterates over target_ary (an indexed array), searching for target_key, if the # key is found its value is set to new_value otherwise the target_key and # new_value are appended to the array. # # The indexed array values must conform to this format: # "key:value" # Where key and value are separated by a single colon character. # # Specify empty values as an empty, quoted string. # # So-called "fake" associative arrays are useful for environments where the # installed version of bash(1) precedes 4.0. # @param target_key Key to retrieve # @param new_value New or updated value # @param target_ary Indexed array to scan # @return Returns new array with updated key (status 0) or an empty array # (status 1) on failure. # */ _setValueForKeyFakeAssocArray() { # parameter list supports empty arguments! local target_key="$1"; shift local new_value="$1"; shift local target_ary=() local defaultIFS="$IFS" local IFS="$defaultIFS" local found=false IFS=$' ' target_ary=( $1 ) IFS="$defaultIFS" [[ -z "${target_key}" || "${#target_ary[@]}" -eq 0 ]] && echo "${value}" && return 1 local _target_ary_length="${#target_ary[@]}" local i for (( i=0; i<"${_target_ary_length}"; i++ )); do local __val="${target_ary[$i]}" if [[ "${__val%%:*}" == "${target_key}" ]]; then target_ary[$i]="${__val%%:*}:${new_value}" found=true break fi unset __val done unset i _target_ary_length # key not found, append [[ "$found" == false ]] && target_ary+=( "${target_key}:${new_value}" ) printf "%s" "${target_ary[*]}" } # _valueForKeyFakeAssocArray() # /*! # @abstract Fetch value for key from a fake associative array # @discussion # Iterates over target_ary (an indexed array), searching for target_key, if the # key is found its value is returned. # # The indexed array values must conform to this format: # "key:value" # Where key and value are separated by a single colon character. # # So-called "fake" associative arrays are useful for environments where the # installed version of bash(1) precedes 4.0. # @param target_key Key to retrieve # @param target_ary Indexed array to scan # @return Returns string containing value (status 0) or an empty string # (status 1) on failure. # */ _valueForKeyFakeAssocArray() { local target_key="$1" local target_ary=() local defaultIFS="$IFS" local IFS="$defaultIFS" local value="" IFS=$' ' target_ary=( $2 ) IFS="$defaultIFS" [[ -z "${target_key}" || "${#target_ary[@]}" -eq 0 ]] && echo "${value}" && return 1 local t for t in "${target_ary[@]}"; do if [[ "${t%%:*}" == "${target_key}" ]]; then value="${t#*:}" break fi done unset t echo -e "${value}"; return 0 } _fetchCommitRange() { local list_all="${1:-false}" local start_tag="$2" local final_tag="$3" if [[ "$list_all" == true ]]; then git log $GIT_LOG_OPTS --pretty=format:"${CUR_GIT_LOG_FORMAT}" elif [[ -n "$final_tag" && "$start_tag" == "null" ]]; then git log $GIT_LOG_OPTS --pretty=format:"${CUR_GIT_LOG_FORMAT}" "${final_tag}" elif [[ -n "$final_tag" ]]; then git log $GIT_LOG_OPTS --pretty=format:"${CUR_GIT_LOG_FORMAT}" "${start_tag}"'..'"${final_tag}" elif [[ -n "$start_tag" ]]; then git log $GIT_LOG_OPTS --pretty=format:"${CUR_GIT_LOG_FORMAT}" "${start_tag}"'..' fi | sed 's/^ \* \*/ */g' } _formatCommitPlain() { local start_tag="$1" local final_tag="$2" printf "%s" "$(_fetchCommitRange "false" "$start_tag" "$final_tag")" } _formatCommitPretty() { local title_tag="$1" local title_date="$2" local start_tag="$3" local final_tag="$4" local title="$title_tag / $title_date" local title_underline="" local i for i in $(seq ${#title}); do title_underline+="=" done unset i printf '\n%s\n%s\n' "$title" "$title_underline" printf "\n%s\n" "$(_fetchCommitRange "false" "$start_tag" "$final_tag")" } commitList() { # parameter list supports empty arguments! local list_all="${1:-false}"; shift local title_tag="$1"; shift local start_tag="$1"; shift local final_tag="$1"; shift local list_style="${1:-false}" # enable/disable list format local changelog="$FILE" local title_date="$(date +'%Y-%m-%d')" local tags_list=() local tags_list_keys=() local defaultIFS="$IFS" local IFS="$defaultIFS" # # Tags look like this: # # >git log --tags --simplify-by-decoration --date="short" --pretty="format:%h$%x09%ad$%x09%d" # # ecf1f2b$ 2015-03-15$ (HEAD, tag: v1.0.1, origin/master, origin/HEAD, master, hotfix/1.0.2) # a473e9c$ 2015-03-04$ (tag: v1.0.0) # f2cb562$ 2015-02-19$ (tag: v0.9.2) # 6197c2b$ 2015-02-19$ (tag: v0.9.1) # 1e5f5e6$ 2015-02-16$ (tag: v0.9.0) # 3de8ab5$ 2015-02-11$ (origin/feature/restore-auto) # a15afd1$ 2015-02-02$ (origin/feature/versionable) # 38a44e0$ 2015-02-02$ (origin/feature/save-auto) # 3244b80$ 2015-01-16$ (origin/feature/silent-history, upstream) # 85e45f8$ 2014-08-25$ # # The most-recent tag will be preceded by "HEAD, " if there have been zero # commits since the tag. Also notice that with gitflow, we see features. # # fetch our tags local _ref _date _tag _tab='%x09' local _tag_regex='tag: *' while IFS=$'\t' read _ref _date _tag; do [[ -z "${_tag}" ]] && continue # strip out tags form () # git v2.2.0+ supports '%D', like '%d' without the " (", ")" wrapping. One day we should use it instead. _tag="${_tag# }"; _tag="${_tag//[()]/}" # trap tag if it points to last commit (HEAD) _tag="${_tag#HEAD*, }" # strip out branches [[ ! "${_tag}" =~ ${_tag_regex} ]] && continue # strip out any additional tags pointing to same commit, remove tag label _tag="${_tag%%,*}"; _tag="${_tag#tag: }" # add tag to assoc array; copy tag to tag_list_keys for ordered iteration tags_list+=( "${_tag}:${_ref}=>${_date}" ) tags_list_keys+=( "${_tag}" ) done <<< "$(git log --tags --simplify-by-decoration --date="short" --pretty="format:%h${_tab}%ad${_tab}%d")" IFS="$defaultIFS" unset _tag_regex unset _ref _date _tag _tab local _tags_list_keys_length="${#tags_list_keys[@]}" if [[ "${_tags_list_keys_length}" -eq 0 ]] then unset _tags_list_keys_length if [[ "$list_style" == true ]]; then printf "%s" "$(_fetchCommitRange "true")" else local title="$title_tag / $title_date" local title_underline="" local i for i in $(seq ${#title}); do title_underline+="=" done unset i printf '\n%s\n%s\n' "$title" "$title_underline" printf "\n%s\n" "$(_fetchCommitRange "true")" fi return fi local _final_tag_found=false local _start_tag_found=false local i for (( i=0; i<"${_tags_list_keys_length}"; i++ )); do local __curr_tag="${tags_list_keys[$i]}" local __prev_tag="${tags_list_keys[$i+1]:-null}" local __curr_date="$(_valueForKeyFakeAssocArray "${__curr_tag}" "${tags_list[*]}")" __curr_date="${__curr_date##*=>}" # output latest commits, up until the most-recent tag, these are all # new commits made since the last tagged commit. if [[ $i -eq 0 && ( -z "$final_tag" || "$final_tag" == "null" ) ]]; then if [[ "$list_style" == true ]]; then _formatCommitPlain "${__curr_tag}" >> "$tmpfile" else _formatCommitPretty "$title_tag" "$title_date" "${__curr_tag}" fi fi # both final_tag and start_tag are "null", user just wanted recent commits [[ "$final_tag" == "null" && "$start_tag" == "null" ]] && break; # find the specified final tag, continue until found if [[ -n "$final_tag" && "$final_tag" != "null" ]]; then [[ "$final_tag" == "${__curr_tag}" ]] && _final_tag_found=true [[ "$final_tag" != "${__curr_tag}" && "${_final_tag_found}" == false ]] && continue fi # find the specified start tag, break when found if [[ -n "$start_tag" ]]; then [[ "$start_tag" == "${__curr_tag}" ]] && _start_tag_found=true [[ "$start_tag" != "${__curr_tag}" && "${_start_tag_found}" == true ]] && break fi # output commits made between prev_tag and curr_tag, these are all of the # commits related to the tag of interest. if [[ "$list_style" == true ]]; then _formatCommitPlain "${__prev_tag}" "${__curr_tag}" else _formatCommitPretty "${__curr_tag}" "${__curr_date}" "${__prev_tag}" "${__curr_tag}" fi unset __curr_date unset __prev_tag unset __curr_tag done unset i unset _start_tag_found unset _final_tag_found unset _tags_list_keys_length return } commitListPlain() { local list_all="${1:-false}" local start_tag="$2" local final_tag="$3" commitList "$list_all" "" "$start_tag" "$final_tag" "true" } commitListPretty() { local list_all="${1:-false}" local title_tag="$2" local start_tag="$3" local final_tag="$4" local title_date="$(date +'%Y-%m-%d')" commitList "$list_all" "$title_tag" "$start_tag" "$final_tag" } _exit() { local pid_list=() local defaultIFS="$IFS" local IFS="$defaultIFS" stty sane; echo; echo "caught signal, shutting down" IFS=$'\n' # The format of `ps` is different between Windows and other platforms, # so we need to calculate the total column number(COL_NUM) of header first. # Why don't we just use the last column? # Because the body of CMD column may contain space and be treated as multiple fileds. pid_list=( $(ps -f | awk -v ppid=$$ 'NR == 1 { COL_NUM = NF } $3 == ppid { # filter out temp processes created in this subshell if ($COL_NUM != "ps" && $COL_NUM != "awk" && $COL_NUM !~ "bash$") print $2 }') ) IFS="$defaultIFS" local _pid for _pid in "${pid_list[@]}"; do echo "killing: ${_pid}" kill -TERM ${_pid} done wait; stty sane; exit 1 } trap '_exit' SIGINT SIGQUIT SIGTERM main() { local start_tag="null" # empty string and "null" mean two different things! local final_tag="null" local option=( "list_all:false" "list_style:false" "title_tag:$DEF_TAG_RECENT" "start_tag:" "final_tag:" "output_file:" "use_stdout:false" "prune_old:false" ) # # We work chronologically backwards from NOW towards start_tag where NOW also # includes the most-recent (un-tagged) commits. If no start_tag has been # specified, we work back to the very first commit; if a final_tag has been # specified, we begin at the final_tag and work backwards towards start_tag. # # An existing ChangeLog/History file will be appended to the output unless the # prune old (-p | --prune-old) option has been enabled. while [ "$1" != "" ]; do case $1 in -a | --all ) option=( $(_setValueForKeyFakeAssocArray "list_all" true "${option[*]}") ) ;; -l | --list ) option=( $(_setValueForKeyFakeAssocArray "list_style" true "${option[*]}") ) ;; -t | --tag ) option=( $(_setValueForKeyFakeAssocArray "title_tag" "$2" "${option[*]}") ) shift ;; -f | --final-tag ) option=( $(_setValueForKeyFakeAssocArray "final_tag" "$2" "${option[*]}") ) shift ;; -s | --start-tag ) option=( $(_setValueForKeyFakeAssocArray "start_tag" "$2" "${option[*]}") ) shift ;; -n | --no-merges ) GIT_LOG_OPTS='--no-merges' CUR_GIT_LOG_FORMAT="$GIT_LOG_FORMAT" ;; -m | --merges-only ) GIT_LOG_OPTS='--merges' CUR_GIT_LOG_FORMAT="$GIT_MERGELOG_FORMAT" ;; -p | --prune-old ) option=( $(_setValueForKeyFakeAssocArray "prune_old" true "${option[*]}") ) ;; -x | --stdout ) option=( $(_setValueForKeyFakeAssocArray "use_stdout" true "${option[*]}") ) ;; -h | ? | help | --help ) _usage exit 1 ;; * ) [[ "${1:0:1}" == '-' ]] && _error "Invalid option: $1" && _usage && exit 1 option=( $(_setValueForKeyFakeAssocArray "output_file" "$1" "${option[*]}") ) ;; esac shift done # The default log format unless already set [[ -z "$CUR_GIT_LOG_FORMAT" ]] && CUR_GIT_LOG_FORMAT="$GIT_LOG_FORMAT" local _tag="$(_valueForKeyFakeAssocArray "start_tag" "${option[*]}")" if [[ -n "${_tag}" ]]; then start_tag="$(git describe --tags --abbrev=0 "${_tag}" 2>/dev/null)" if [[ -z "$start_tag" ]]; then _error "Specified start-tag does not exist!" return 1 fi fi unset _tag local _tag="$(_valueForKeyFakeAssocArray "final_tag" "${option[*]}")" if [[ -n "${_tag}" ]]; then final_tag="$(git describe --tags --abbrev=0 "${_tag}" 2>/dev/null)" if [[ -z "$final_tag" ]]; then _error "Specified final-tag does not exist!" return 1 fi fi unset _tag # # generate changelog # local tmpfile="$(git_extra_mktemp)" local changelog="$(_valueForKeyFakeAssocArray "output_file" "${option[*]}")" local title_tag="$(_valueForKeyFakeAssocArray "title_tag" "${option[*]}")" if [[ "$(_valueForKeyFakeAssocArray "list_style" "${option[*]}")" == true ]]; then if [[ "$(_valueForKeyFakeAssocArray "list_all" "${option[*]}")" == true ]]; then commitListPlain "true" >> "$tmpfile" else commitListPlain "false" "$start_tag" "$final_tag" >> "$tmpfile" fi else if [[ "$(_valueForKeyFakeAssocArray "list_all" "${option[*]}")" == true ]]; then commitListPretty "true" "$title_tag" >> "$tmpfile" else commitListPretty "false" "$title_tag" "$start_tag" "$final_tag" >> "$tmpfile" fi fi if [[ -z "$changelog" ]]; then changelog="$(ls | egrep 'change|history' -i | head -n1)" if [[ -z "$changelog" ]]; then changelog="History.md"; fi fi # append existing changelog? if [[ -f "$changelog" \ && "$(_valueForKeyFakeAssocArray "prune_old" "${option[*]}")" == false ]]; then cat "$changelog" >> "$tmpfile" fi # output file to stdout or move into place if [[ "$(_valueForKeyFakeAssocArray "use_stdout" "${option[*]}")" == true ]]; then cat "$tmpfile" rm -f "$tmpfile" else cp -f "$tmpfile" "$changelog" rm -f "$tmpfile" # Use `eval` to handle GIT_EDITOR which contains space and options, # like ""C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst ". # Thanks @JanSchulz to inspire me this solution [[ -n "$GIT_EDITOR" ]] && eval $GIT_EDITOR "$changelog" if [[ $? -ne 0 ]]; then _exit fi fi return } main "$@" exit 0 git-extras-4.5.0/bin/git-chore000077500000000000000000000000741324217456300161760ustar00rootroot00000000000000#!/usr/bin/env bash ALIAS=chore git feature -a $ALIAS "$@" git-extras-4.5.0/bin/git-clear000077500000000000000000000003271324217456300161650ustar00rootroot00000000000000#!/usr/bin/env bash echo -n "Sure? - This command may delete files that cannot be recovered, including those in .gitignore [y/N]: " read ans if [ "$ans" == "y" ] then git clean -d -f -x && git reset --hard fi git-extras-4.5.0/bin/git-clear-soft000077500000000000000000000003541324217456300171360ustar00rootroot00000000000000#!/usr/bin/env bash echo -n "Sure? - This command may delete files that cannot be recovered. Files and directories in .gitignore will be preserved [y/N]: " read ans if [ "$ans" == "y" ] then git clean -d -f && git reset --hard fi git-extras-4.5.0/bin/git-commits-since000077500000000000000000000002241324217456300176450ustar00rootroot00000000000000#!/usr/bin/env bash SINCE="last week" test $# -ne 0 && SINCE=$@ echo "... commits since $SINCE" >&2 git log --pretty='%an - %s' --after="@{$SINCE}"git-extras-4.5.0/bin/git-contrib000077500000000000000000000001741324217456300165370ustar00rootroot00000000000000#!/usr/bin/env bash user="$*" test -z "$user" && echo "user name required." 1>&2 && exit 1 git shortlog --author="$user" git-extras-4.5.0/bin/git-count000077500000000000000000000002551324217456300162270ustar00rootroot00000000000000#!/usr/bin/env bash if test "$1" = "--all"; then git shortlog -n -s | awk '{print substr($0,index($0,$2)) " (" $1 ")"}' echo fi echo total `git rev-list --count HEAD` git-extras-4.5.0/bin/git-create-branch000077500000000000000000000011111324217456300175650ustar00rootroot00000000000000#!/usr/bin/env bash while test $# != 0 do case $1 in -r|--remote) if [[ -n $2 ]] then REMOTE=$2 shift else REMOTE=origin fi ;; *) BRANCH=$1 esac shift done if [[ -z $BRANCH ]] && [[ -n $REMOTE ]] then BRANCH=$REMOTE REMOTE=origin fi test -z $BRANCH && echo "branch required." 1>&2 && exit 1 if [[ -n $REMOTE ]] then git ls-remote --exit-code $REMOTE &>/dev/null if [ $? = 0 ] then git push $REMOTE HEAD:refs/heads/$BRANCH git fetch $REMOTE git checkout --track -b $BRANCH $REMOTE/$BRANCH exit $? fi fi git checkout -b $BRANCH git-extras-4.5.0/bin/git-delete-branch000077500000000000000000000007341324217456300175760ustar00rootroot00000000000000#!/usr/bin/env bash set -e # Assert there is at least one branch provided test -z $1 && echo "branch required." 1>&2 && exit 1 for branch in "$@" do remote=$(git config branch.$branch.remote) test -z $remote && remote="origin" ref=$(git config branch.$branch.merge) test -z $ref && ref="refs/heads/$branch" git branch -D $branch # Avoid deleting local upstream [ "$remote" == "." ] && continue git branch -d -r $remote/$branch git push $remote :$ref done git-extras-4.5.0/bin/git-delete-merged-branches000077500000000000000000000002741324217456300213660ustar00rootroot00000000000000#!/usr/bin/env bash branches=$(git branch --no-color --merged | grep -v "\*" | grep -v master | grep -v svn) if [ -n "$branches" ] then echo "$branches" | xargs -n 1 git branch -d fi git-extras-4.5.0/bin/git-delete-submodule000077500000000000000000000015521324217456300203370ustar00rootroot00000000000000#!/usr/bin/env bash test -z "$1" && echo "submodule required" 1>&2 && exit 1 cd "$(git root)" test ! -f .gitmodules && echo ".gitmodules file not found" 1>&2 && exit 2 NAME="$(echo "$1" | sed 's/\/$//g')" test -z \ "$(git config --file=.gitmodules submodule."$NAME".url)" \ && echo "submodule not found" 1>&2 && exit 3 # 1. Delete the relevant section from .git/config and clean submodule files git submodule deinit -f "$NAME" || exit 4 rmdir "$NAME" rm -rf .git/modules/"$NAME" # 2. Delete the relevant line from .gitmodules git config --file=.gitmodules --remove-section submodule."$NAME" git add .gitmodules # 3. Run git rm --cached path_to_submodule git rm --cached -rf "$NAME" # 4. Need to confirm and commit the changes for yourself echo echo "Now submodule $NAME is deleted." echo 'Confirm with `git submodule status` and commit the changes for yourself.' git-extras-4.5.0/bin/git-delete-tag000077500000000000000000000005621324217456300171130ustar00rootroot00000000000000#!/usr/bin/env bash # Assert there is at least one tag provided test -z $1 && echo "tag required." 1>&2 && exit 1 # Concatenate all the tag references local_tags="" origin_refs="" for tagname in "$@" do local_tags=$local_tags" $tagname" origin_refs=$origin_refs" :refs/tags/$tagname" done # Delete all the tags git tag -d $local_tags git push origin $origin_refs git-extras-4.5.0/bin/git-delta000077500000000000000000000003071324217456300161660ustar00rootroot00000000000000#!/usr/bin/env bash branch=master filter=ACM if test $# -eq 1; then branch=$1 else if test $# -eq 2; then branch=$1 filter=$2 fi fi git diff --name-only --diff-filter=$filter $branchgit-extras-4.5.0/bin/git-effort000077500000000000000000000106001324217456300163570ustar00rootroot00000000000000#!/usr/bin/env bash tmp=$(git_extra_mktemp) above=0 # if the output won't be printed to tty, disable the color test -t 1 && to_tty=true color= # # print usage message # usage() { echo 1>&2 "usage: git effort [--above ] [...] [-- [...]]" } # # get dates for the given # dates() { eval "git log $args_to_git_log --pretty='format: %ad' --date=short -- \"$1\"" } # tput, being quiet about unknown capabilities tputq() { tput "$@" 2>/dev/null return 0 } # # hide cursor # hide_cursor() { tputq civis } # # show cursor, and remove temporary file # show_cursor_and_cleanup() { tputq cnorm tputq sgr0 rm "$tmp" > /dev/null 2>&1 exit 0 } # # get active days for the given # active_days() { echo "$1" | sort -r | uniq | wc -l } # # set 'color' based on the given # color_for() { if [ "$to_tty" = true ]; then if [ $1 -gt 200 ]; then color="$(tputq setaf 1)$(tputq bold)" elif [ $1 -gt 150 ]; then color="$(tputq setaf 1)" # red elif [ $1 -gt 125 ]; then color="$(tputq setaf 2)$(tputq bold)" elif [ $1 -gt 100 ]; then color="$(tputq setaf 2)" # green elif [ $1 -gt 75 ]; then color="$(tputq setaf 5)$(tputq bold)" elif [ $1 -gt 50 ]; then color="$(tputq setaf 5)" # purplish elif [ $1 -gt 25 ]; then color="$(tputq setaf 3)$(tputq bold)" elif [ $1 -gt 10 ]; then color="$(tputq setaf 3)" # yellow else color="$(tputq sgr0)" # default color fi else color="" fi } # # compute the effort of the given # effort() { path=$1 local commit_dates local color reset_color commits len dot f_dot i msg active reset_color="" test "$to_tty" = true && reset_color="$(tputq sgr0)" commit_dates=`dates "$path"` [ $? -gt 0 ] && exit 255 # Ensure it's not just an empty line if [ -z "`head -c 1 <<<$(echo $commit_dates)`" ] then exit 0 fi commits=`wc -l <<<"$(echo "$commit_dates")"` color='90' # ignore <= --above test $commits -le $above && exit 0 # commits color_for $(( $commits - $above )) len=${#path} dot="." f_dot="$path" i=0 ; while test $i -lt $(( $columns - $len )) ; do f_dot=$f_dot$dot i=$(($i+1)) done msg=$(printf " ${color}%s %-10d" "$f_dot" $commits) # active days active=`active_days "$commit_dates"` color_for $(( $active - $above )) msg="$msg $(printf "${color} %d${reset_color}\n" $active)" echo "$msg" } # # print heading # heading() { echo printf " %-${columns}s %-10s %s\n" 'path' 'commits' 'active days' echo } # # output sorted results # sort_effort() { clear echo " " heading < $tmp sort -rn -k 2 } declare -a paths=() while [ "${#}" -ge 1 ] ; do case "$1" in --above) shift above=$1 ;; --) shift args_to_git_log=$(printf " %q" "${@:1}") break ;; --*) usage echo 1>&2 "error: unknown argument $1" echo 1>&2 "error: if that argument was meant for git-log," echo 1>&2 "error: please put it after two dashes ( -- )." exit 1 ;; *) paths+=( "$1" ) ;; esac shift done # Exit if above-value is not an int if [ -z "${above##*[!0-9]*}" ] ; then echo "error: argument to --above was not an integer" 1>&2 exit 1 fi # remove empty quotes that appear when there are no arguments args_to_git_log="${args_to_git_log#\ \'\'}" export args_to_git_log # set column width to match longest filename columns=$(( $(git ls-files | awk '{ print length }' | sort -rn | head -1 ) + 5 )) export columns # [path ...] if test "${#paths}" -eq 0; then save_ifs=$IFS IFS=`echo -en "\n\b"` paths=(`git ls-files`) IFS=$save_ifs unset save_ifs fi # hide cursor hide_cursor trap show_cursor_and_cleanup INT # export functions so subshells can call them export -f effort export -f color_for export -f active_days export -f dates export -f tputq export to_tty export above export log_args bash_params= # If bash exits successfully with --import-functions, # then we need to pass it (FreeBSD probably) bash --import-functions -c ":" 1>/dev/null 2>&1 if [ $? -eq 0 ] ; then bash_params="--import-functions" fi heading # send paths to effort printf "%s\0" "${paths[@]}" | xargs -0 -n 1 -P 4 -I % bash $bash_params -c "effort \"%\"" | tee $tmp # if more than one path, sort and print test "$(wc -l $tmp | awk '{print $1}')" -gt 1 && sort_effort echo show_cursor_and_cleanup git-extras-4.5.0/bin/git-extras000077500000000000000000000024301324217456300164020ustar00rootroot00000000000000#!/usr/bin/env bash VERSION="4.5.0" INSTALL_SCRIPT="https://raw.githubusercontent.com/tj/git-extras/master/install.sh" update() { local bin="$(which git-extras)" local prefix=${bin%/*/*} local orig=$PWD curl -s $INSTALL_SCRIPT | PREFIX="$prefix" bash /dev/stdin \ && cd "$orig" \ && echo "... updated git-extras $VERSION -> $(git extras --version)" } updateForWindows() { local bin="$(which git-extras)" local prefix=${bin%/*/*} local orig=$PWD # we need to clean up /tmp manually on windows cd /tmp \ && rm -rf ./git-extras \ && echo "Setting up 'git-extras'...." \ && git clone https://github.com/tj/git-extras.git &> /dev/null \ && cd git-extras \ && git checkout \ $(git describe --tags $(git rev-list --tags --max-count=1)) \ &> /dev/null \ && ./install.cmd "$prefix" \ && cd "$orig" \ && echo "... updated git-extras $VERSION -> $(git extras --version)" rm -rf /tmp/git-extras &> /dev/null } case "$1" in -v|--version) echo $VERSION && exit 0 ;; update) platform=$(uname -s) if [ "${platform::9}" = "CYGWIN_NT" ] || \ [ "${platform::5}" = "MINGW" ] || \ [ "${platform::7}" = "MSYS_NT" ] then updateForWindows else update fi ;; *) git extras --help ;; esac git-extras-4.5.0/bin/git-feature000077500000000000000000000020411324217456300165250ustar00rootroot00000000000000#!/usr/bin/env bash branch_prefix=feature declare -a argv while test $# != 0 do case $1 in -a|--alias ) if [[ -n $2 ]] then shift # shift -a|-alias branch_prefix=$1 else argv+=($1) # treat tail '-a' as fi ;; -r|--remote ) if [[ -n $2 ]] then remote=$2 shift else remote="origin" fi ;; * ) argv+=($1) ;; esac shift done concatargs(){ str=$(IFS='-'; echo "$*") branch="$branch_prefix"/$str } if test "${argv[0]}" = "finish"; then test -z "${argv[1]}" && echo "$branch_prefix" " required." 1>&2 && exit 1 branch="$branch_prefix"/"${argv[1]}" git merge --no-ff "$branch" && git delete-branch "$branch" else test -z "${argv[0]}" && echo "$branch_prefix" " required." 1>&2 && exit 1 if test -n "${argv[1]}"; then concatargs "${argv[@]}" else branch="$branch_prefix"/"${argv[0]}" fi if [[ -n $remote ]] then git create-branch -r $remote $branch else git create-branch $branch fi fi git-extras-4.5.0/bin/git-force-clone000077500000000000000000000046371324217456300173030ustar00rootroot00000000000000#! /usr/bin/env bash set -euo pipefail _usage() { echo " Usage: git-force-clone -b branch remote_url destination_path Example: git-force-clone -b master git@github.com:me/repo.git ./repo_dir Provides the basic functionality of 'git clone', but if the destination git repository already exists it will force-reset it to resemble a clone of the remote. Because it doesn't actually delete the directory, it is usually significantly faster than the alternative of deleting the directory and cloning the repository from scratch. **CAUTION**: If the repository exists, this will destroy *all* local work: changed files will be reset, local branches and other remotes will be removed. OPTIONS: -b, --branch The branch to pull from the remote (default: master) -h, --help Display this help message " } _check() { if [ -z "$1" ]; then echo "Error: Missing ${2}" _usage exit 1 fi } main() { while [[ -n "${1:-}" ]] && [[ "${1:0:1}" == "-" ]]; do case $1 in -b | --branch ) branch=${2:-} shift ;; -h | --help ) _usage exit 0 ;; * ) echo "Error: Invalid option: $1" >>/dev/stderr _usage exit 1 ;; esac shift done remote_url=${1:-} destination_path=${2:-} _check "${remote_url}" "remote_url" _check "${destination_path}" "destination_path" if [ -d "${destination_path}/.git" ]; then ( cd ${destination_path} # Delete all remotes for remote in `git remote`; do git remote rm ${remote} done # Add origin git remote add origin ${remote_url} git fetch origin # Set default branch if [ -z "${branch:-}" ]; then branch=`LC_ALL=C git remote show origin | grep -oP '(?<=HEAD branch: )[^ ]+$'` git remote set-head origin ${branch} else git remote set-head origin -a fi # Make sure current branch is clean git clean -fd git reset --hard HEAD # Get on the desired branch git checkout ${branch} git reset --hard origin/${branch} # Delete all other branches branches=`git branch | grep -v \* | xargs` if [ -n "${branches}" ]; then git branch -D ${branches} fi ) elif [ -n "${branch:-}" ]; then git clone -b ${branch} ${remote_url} ${destination_path} else git clone ${remote_url} ${destination_path} fi } main "$@" exit 0 git-extras-4.5.0/bin/git-fork000077500000000000000000000032251324217456300160400ustar00rootroot00000000000000#!/usr/bin/env bash abort() { echo "$@" exit 1 } url="$1" test -z "$url" && url=$(git remote get-url origin 2> /dev/null) && origin=true # validate repo url test -z "$url" && abort "github repo needs to be specified as an argument" # validate user echo "Enter your github username" read user [ -n "$user" ] || abort "git username required" echo "Enter github two-factor authentication code (leave blank if not set up)" read MFA_CODE # extract owner + project from repo url project=${url##*/} owner=${url%/$project} project=${project%.git} if [[ $owner == git@* ]]; then owner=${owner##*:} else owner=${owner##*/} fi # validate [ -z "$project" -o -z "$owner" ] && abort "github repo needs to be specified as an argument" # create fork curl -qsf \ -X POST \ -u "$user" \ -H "X-GitHub-OTP: $MFA_CODE" \ "https://api.github.com/repos/$owner/$project/forks" [ $? = 0 ] || abort "fork failed" echo "Add GitHub remote branch via SSH (you will be prompted to verify the server's credentials)? (y/n)" read use_ssh # Check if user has ssh configured with GitHub if [ -n "$use_ssh" ] && ssh -T git@github.com 2>&1 | grep -qi 'success'; then remote_prefix="git@github.com:" else remote_prefix="https://github.com/" fi if [ "$origin" = true ]; then git remote rename origin upstream git remote add origin "${remote_prefix}${user}/${project}.git" git fetch origin else # clone forked repo into current dir git clone "${remote_prefix}${user}/${project}.git" "$project" # add reference to origin fork so can merge in upstream changes cd "$project" git remote add upstream "${remote_prefix}${owner}/${project}.git" git fetch upstream fi git-extras-4.5.0/bin/git-fresh-branch000077500000000000000000000006141324217456300174400ustar00rootroot00000000000000#!/usr/bin/env bash branch=$1 test -z $branch && echo "branch required." 1>&2 && exit 1 changes=`git status --porcelain` clean() { git symbolic-ref HEAD refs/heads/$branch rm .git/index git clean -fdx } if [ ! -z "$changes" ]; then read -p "All untracked changes will be lost. Continue [y/N]? " res case $res in [Yy]* ) ;; * ) exit 0;; esac fi clean git-extras-4.5.0/bin/git-gh-pages000077500000000000000000000010441324217456300165670ustar00rootroot00000000000000#!/usr/bin/env bash echo 'setting up gh-pages' echo '-------------------' echo 'Tell me your github account username: ' read username echo 'Now, tell me your repository name: ' read repository git stash \ && git checkout -b 'gh-pages' \ && echo 'My Page' > index.html \ && git add . \ && git commit -a -m 'Initial commit' \ && git remote add origin https://github.com/"$username"/"$repository".git \ && git push -u origin gh-pages \ && echo 'Complete' \ && echo '-------------------' \ && echo 'You can find your last changes in the stash!' git-extras-4.5.0/bin/git-graft000077500000000000000000000003601324217456300161770ustar00rootroot00000000000000#!/usr/bin/env bash src=$1 dst=$2 test -z $src && echo "source branch required." 1>&2 && exit 1 test -z $dst && echo "destination branch required." 1>&2 && exit 1 git checkout $dst \ && git merge --no-ff $src \ && git branch -d $src git-extras-4.5.0/bin/git-guilt000077500000000000000000000065171324217456300162320ustar00rootroot00000000000000#!/usr/bin/env bash for param in $* do case $param in -h) echo 'Usage: git-guilt [] ' echo 'Calculates the change in blame between two revisions' echo 'Example: git guilt HEAD~3 HEAD' echo echo 'Options:' echo echo ' -h, --help output usage information' echo ' -e, --email display author emails instead of names' echo ' -w, --ignore-whitespace ignore whitespace only changes when attributing blame' echo ' -d, --debug output debug information' exit 0 ;; -e|--email ) EMAIL='-e' shift ;; -w|--ignore-whitespace ) NOT_WHITESPACE='-w' shift ;; -d|--debug ) DEBUG=$(git_extra_mktemp) shift ;; esac done cd "$(git-root)" # cd for git blame MERGED_LOG=$(git_extra_mktemp) if [[ $EMAIL == '-e' ]] then PATTERN='s/^author-mail <\(.*\)>/\1/p' else PATTERN='s/^author //p' fi for file in $(git diff --name-only "$@") do test -n "$DEBUG" && echo "git blame $file" # $1 - since $2 - until git blame $NOT_WHITESPACE --line-porcelain "$1" -- "$file" 2> /dev/null | sed -n "$PATTERN" | sort | uniq -c | sed 's/^\(.\)/- \1/' >> $MERGED_LOG # if $2 not given, use current commit as "until" git blame $NOT_WHITESPACE --line-porcelain "${2-@}" -- "$file" 2> /dev/null | sed -n "$PATTERN" | sort | uniq -c | sed 's/^\(.\)/+ \1/' >> $MERGED_LOG done DEBUG="$DEBUG" awk ' NR==1 { # the index of $2 does not change in each line name_start_at = index($0, $3) } /^\+/ { contributors[substr($0, name_start_at)] += $2 } /^-/ { contributors[substr($0, name_start_at)] -= $2 } END { for (people in contributors) { if (ENVIRON["DEBUG"]) { printf("%d %s\n", contributors[people], people) >> ENVIRON["DEBUG"] } if (contributors[people] != 0) { printf("%d %s\n", contributors[people], people) } } }' $MERGED_LOG | sort -nr | # only gawk supports built-in sort function while read line do people=${line#* } num=${line%% *} if [[ $num -gt 0 ]] then if [[ ${#people} -ge 29 ]] then printf "%-29s \033[00;32m" "$people" else printf "%-29s\t\033[00;32m" "$people" fi if [[ $num -ge 50 ]] then len=${#num} for (( i = 0; i < 48 - len; i++ )) do printf "+" done printf "(%s)" $num else for (( i = 0; i < num; i++ )) do printf "+" done fi else if [[ ${#people} -ge 29 ]] then printf "%-29s \033[00;31m" "$people" else printf "%-29s\t\033[00;31m" "$people" fi if [[ $num -le -50 ]] then len=${#num} for (( i = 0; i < 48 - len; i++ )) do printf "-" done printf "(%s)" $num else for (( i = 0; i > num; i-- )) do printf "-" done fi fi printf "\033[00m\n" done test -n "$DEBUG" && sort -nr "$DEBUG" git-extras-4.5.0/bin/git-ignore000077500000000000000000000027121324217456300163620ustar00rootroot00000000000000#!/usr/bin/env bash function show_contents { local file="${2/#~/$HOME}" if [ -f "$file" ]; then echo "$1 gitignore: $2" && cat "$file" else echo "There is no $1 .gitignore yet" fi } function show_global { show_contents Global `git config --global core.excludesfile` } function add_global { local global_gitignore=$(git config --global core.excludesfile) if [ -z "$global_gitignore" ]; then echo "Can't find global .gitignore." echo "" echo "Use 'git config --global --add core.excludesfile ~/.gitignore-global' to set the path to your global gitignore file to '~/.gitignore-global'." echo "" else add_patterns `git config --global core.excludesfile` "$@" fi } function show_local { cd "$(git root)" show_contents Local .gitignore } function add_local { cd "$(git root)" add_patterns .gitignore "$@" } function add_patterns { echo "Adding pattern(s) to: $1" local file="${1/#~/$HOME}" for pattern in "${@:2}"; do echo "... adding '$pattern'" (test -f "$file" && test "$pattern" && grep -q -F -x -- "$pattern" "$file") || echo "$pattern" >> "$file" done } if test $# -eq 0; then show_global echo "---------------------------------" show_local else case "$1" in -l|--local) test $# -gt 1 && add_local "${@:2}" && echo show_local ;; -g|--global) test $# -gt 1 && add_global "${@:2}" && echo show_global ;; *) add_local "$@" ;; esac fi git-extras-4.5.0/bin/git-ignore-io000077500000000000000000000076351324217456300170000ustar00rootroot00000000000000#!/usr/bin/env bash gitignore_io_url="https://www.gitignore.io/api/" default_path="$HOME/.gi_list" update_gi_list() { curl -L -s "${gitignore_io_url}/list" > ~/.gi_list } print_in_alphabetical_order() { local first_character previous_first_character ignorable local first=true for ignorable in $(echo "$gi_list" | sort); do first_character=${ignorable:0:1} if [[ $first_character = $previous_first_character ]]; then printf " %s" "$ignorable" elif [[ $first = true ]]; then previous_first_character=$first_character first=false printf "%s" "$ignorable" else previous_first_character=$first_character printf "\n%s" "$ignorable" fi done echo } print_in_table_format() { echo "$gi_list" | column } search() { for type in $gi_list; do if [[ "$type" == *$1* ]] then echo "$type" fi done } print_last_modified_time() { gi_list_date=$(stat -c "%y" "$default_path" 2> /dev/null) if [ "$?" -ne 0 ]; then gi_list_date=$(stat -f "%t%Sm" "$default_path" 2> /dev/null) if [ "$?" -ne 0 ]; then gi_list_date=$(date -r "$default_path" +%s 2> /dev/null) [ "$?" -ne 0 ] && gi_list_date=0 fi fi echo "Last update time: $gi_list_date" } gi() { curl -L -s $gitignore_io_url/"$1" } gi_replace() { gi "$1" > .gitignore } gi_append() { gi "$1" >> .gitignore } show_usage() { echo "Usage:" echo " git ignore-io ... Show gitignore template" echo " [-a|--append] ... Append new .gitignore content to .gitignore under the current directory" echo " [-r|--replace] ... Export new .gitignore to the current directory (The old one will be replaced)" echo " [-l|--list-in-table] Print available types in table format" echo " [-L|--list-alphabetically] Print available types in alphabetical order " echo " [-s|--search] Search word in available types" echo " [-t|--show-update-time] Show the last modified time of ~/.gi_list (where the list of available types is stored)" echo " [-u|--update-list] Update ~/.gi_list" } check_list_exist() { if ! [ -f "$default_path" ]; then echo "-----Initial gitignore.io list----" update_gi_list & echo "-----Save to $default_path-----" echo fi gi_list=$(tr "," "\n" < "$default_path" 2>/dev/null) } check_list_exist if [[ $# -eq 0 ]]; then show_usage else case $1 in -a|--append|-r|--replace) opt=$1 shift if [[ $# -eq 0 ]]; then echo "There should be at least one type" echo show_usage exit fi gi_to_curl=$(echo "$@" | tr " " ",") case $opt in -a|--append) gi_append "$gi_to_curl" ;; -r|--replace) gi_replace "$gi_to_curl" ;; esac exit ;; -t|--show-update-time) print_last_modified_time ;; -u|--update-list) update_gi_list ;; -s|--search) opt=$1 shift if [[ $# -eq 0 ]]; then show_usage exit fi search "$1" ;; -L|--list-alphabetically) print_in_alphabetical_order ;; -l|--list-in-table) print_in_table_format ;; -*) echo No Such option show_usage ;; *) gi_to_curl=$(echo "$@" | tr " " ",") gi "$gi_to_curl" ;; esac fi git-extras-4.5.0/bin/git-info000077500000000000000000000013171324217456300160320ustar00rootroot00000000000000#!/usr/bin/env bash get_config() { git config --list } most_recent_commit() { git log --max-count=1 --pretty=short } local_branches() { git branch } remote_branches() { git branch -r } remote_urls() { git remote -v } echon() { echo "$@" echo } # Show info similar to svn echo echon "## Remote URLs:" echon "$(remote_urls)" echon "## Remote Branches:" echon "$(remote_branches)" echon "## Local Branches:" echon "$(local_branches)" echon "## Most Recent Commit:" echon "$(most_recent_commit)" echon "Type 'git log' for more commits, or 'git show ' for full commit details." if test "$1" != "--no-config"; then echon "## Configuration (.git/config):" echon "$(get_config)" fi git-extras-4.5.0/bin/git-line-summary000077500000000000000000000015601324217456300175210ustar00rootroot00000000000000#!/usr/bin/env bash project=${PWD##*/} # # list the last modified author for each line # single_file() { while read data do if [[ $(file "$data") = *text* ]]; then git blame --line-porcelain "$data" 2>/dev/null | grep "^author\ " | LC_ALL=C sed -n 's/^author //p'; fi done } # # list the author for all file # lines() { git ls-files | single_file } # # count the line count # count() { lines | wc -l } # # sort by author modified lines # authors() { lines | sort | uniq -c | sort -rn } # # list as percentage for author modified lines # result() { authors | awk ' { args[NR] = $0; sum += $0 } END { for (i = 1; i <= NR; ++i) { printf " %s, %2.1f%%\n", args[i], 100 * args[i] / sum } } ' | column -t -s, } # summary echo echo " project : $project" echo " lines : $(count)" echo " authors :" result echo git-extras-4.5.0/bin/git-local-commits000077500000000000000000000001641324217456300176410ustar00rootroot00000000000000#!/usr/bin/env bash ref=$(git symbolic-ref HEAD) branch=${ref#refs/heads/} git log origin/${branch}..${branch} $* git-extras-4.5.0/bin/git-lock000077500000000000000000000002121324217456300160200ustar00rootroot00000000000000#!/usr/bin/env bash filename=$1 test -z $filename && echo "filename required." 1>&2 && exit 1 git update-index --skip-worktree $filename git-extras-4.5.0/bin/git-locked000077500000000000000000000001011324217456300163260ustar00rootroot00000000000000#!/usr/bin/env bash git ls-files -v | grep ^S | sed -e 's|S ||' git-extras-4.5.0/bin/git-merge-into000077500000000000000000000013651324217456300171500ustar00rootroot00000000000000#!/usr/bin/env bash current_branch() { git rev-parse --abbrev-ref HEAD } usage() { echo "Usage: git merge-into [src] dest [--ff-only]" } cur_branch=$(current_branch) if [ "${!#}" == '--ff-only' ]; then case $# in 2 ) # dest --ff git push "$(git rev-parse --show-toplevel)" "$cur_branch":"$1";; 3 ) git push "$(git rev-parse --show-toplevel)" "$1":"$2";; * ) usage esac else case $# in 1 ) git checkout "$1" git merge "$cur_branch" "$1" && git checkout "$cur_branch" ;; 2 ) git checkout "$2" git merge "$1" "$2" && git checkout "$cur_branch" ;; * ) usage esac fi git-extras-4.5.0/bin/git-merge-repo000077500000000000000000000005741324217456300171450ustar00rootroot00000000000000#!/usr/bin/env bash repo=$1 branch=$2 prefix=$3 flat=0 if test $prefix = "."; then prefix=$(mktemp -u 'git-merge-repo.XXXXXXX') flat=1 fi git subtree add -P "$prefix" "$repo" "$branch" "${@:4}" message=$(git log -1 --pretty=%B) if test $flat -eq 1; then git stash -u mv -i $prefix/* ./ git undo git add . git commit -am "$message" git stash apply rm -drf $prefix fi git-extras-4.5.0/bin/git-missing000077500000000000000000000013761324217456300165550ustar00rootroot00000000000000#!/usr/bin/env bash usage() { echo 1>&2 "usage: git missing [] []" } if [ "${#}" -lt 1 ] then usage exit 1 fi declare -a git_log_args=() declare -a branches=() for arg in "$@" ; do case "$arg" in --*) git_log_args+=( "$arg" ) ;; *) branches+=( "$arg" ) ;; esac done firstbranch= secondbranch= if [ ${#branches[@]} -eq 2 ] then firstbranch="${branches[0]}" secondbranch="${branches[1]}" elif [ ${#branches[@]} -eq 1 ] then secondbranch="${branches[0]}" else echo >&2 "error: at least one branch required" exit 1 fi git log "${git_log_args[@]}" "$firstbranch"..."$secondbranch" --format="%m %h %s" --left-right git-extras-4.5.0/bin/git-mr000077500000000000000000000012761324217456300155210ustar00rootroot00000000000000#!/usr/bin/env bash set -eu if [ -z "${1-}" ] ; then echo "mr number or URL required. See --help for usage." 1>&2 exit 1 fi if test "$1" = "clean"; then git for-each-ref refs/heads/mr/* --format='%(refname)' | while read ref; do git branch -D ${ref#refs/heads/} done exit 0 elif [[ $1 =~ ^(https?://[^/]+/(.+))/merge_requests/([0-9]+).*$ ]]; then remote=${BASH_REMATCH[1]}.git id=${BASH_REMATCH[3]} else id=$1 remote=${2:-origin} fi branch=mr/$id remote_ref=refs/merge-requests/$id/head git fetch -fu $remote $remote_ref:$branch git checkout $branch git config --local --replace branch.$branch.merge $remote_ref git config --local --replace branch.$branch.remote $remote git-extras-4.5.0/bin/git-obliterate000077500000000000000000000012411324217456300172250ustar00rootroot00000000000000#!/usr/bin/env bash file="" range="" for i in "$@" do # use '--' to separate file list and rev-list arguments test "$i" == '--' && shift && break file="$file"' '"$i" shift done test -n "$*" && range="$*" test -z "$file" && echo "file required." 1>&2 && exit 1 if [ -z "$range" ] then git filter-branch -f --index-filter "git rm -r --cached ""$file"" --ignore-unmatch" \ --prune-empty --tag-name-filter cat -- --all else # don't quote $range so that we can forward multiple rev-list arguments git filter-branch -f --index-filter "git rm -r --cached ""$file"" --ignore-unmatch" \ --prune-empty --tag-name-filter cat -- $range fi git-extras-4.5.0/bin/git-pr000077500000000000000000000013521324217456300155170ustar00rootroot00000000000000#!/usr/bin/env bash # Based on https://gist.github.com/gnarf/5406589 and https://gist.github.com/jhnns/d654d9d6da6d3b749986 if test "$1" = "clean"; then git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref; do git branch -D ${ref#refs/heads/} done exit 0 elif [[ $1 =~ ^(https?://[^/]+/(.+))/pull/([0-9]+).*$ ]]; then remote=${BASH_REMATCH[1]}.git id=${BASH_REMATCH[3]} branch=pr/$id else test -z $1 && echo "pr number required." 1>&2 && exit 1 remote=${2:-origin} id=$1 branch=pr/$id fi git fetch -fu $remote refs/pull/$id/head:$branch && \ git checkout $branch && \ git config --local --replace branch.$branch.merge refs/pull/$id/head && \ git config --local --replace branch.$branch.remote $remote; git-extras-4.5.0/bin/git-psykorebase000077500000000000000000000043551324217456300174330ustar00rootroot00000000000000#!/usr/bin/env bash PROGRAM=$0 PRIMARY_BRANCH="" SECONDARY_BRANCH="" FF="--ff" CONTINUE="no" function current_branch() { git rev-parse --abbrev-ref HEAD } function usage() { echo "USAGE: ${PROGRAM} PRIMARY_BRANCH [SECONDARY_BRANCH] [--no-ff]" echo "USAGE: ${PROGRAM} --continue" echo "" echo "OPTIONS:" echo " --no-ff: Force rebase commit." echo " -c|--continue: Continue after the user updates conflicts." } while [[ $# > 0 ]] do key="$1" case $key in --no-ff) FF="--no-ff" ;; -c|--continue) CONTINUE=yes ;; *) if [[ "$PRIMARY_BRANCH" == "" ]]; then PRIMARY_BRANCH=$key elif [[ "$SECONDARY_BRANCH" == "" ]]; then SECONDARY_BRANCH=$key else usage exit 20 # Error during arguments parsing fi ;; esac shift # past argument or value done if [[ "$SECONDARY_BRANCH" == "" ]]; then SECONDARY_BRANCH=$(current_branch) fi if [[ "$CONTINUE" == "yes" ]]; then TARGET_BRANCH=$(current_branch) set $(echo "$TARGET_BRANCH" | sed -e "s/-rebased-on-top-of-/\n/g") if [[ $# != 2 ]]; then echo "Couldn't continue rebasing on ${TARGET_BRANCH}" exit 30 # Impossible to detect PRIMARY_BRANCH AND SECONDARY_BRANCH fi SECONDARY_BRANCH=$1 PRIMARY_BRANCH=$2 echo "Continuing rebasing of $SECONDARY_BRANCH on top of $PRIMARY_BRANCH" git commit || exit 51 git branch -d ${SECONDARY_BRANCH} || exit 52 git branch -m ${TARGET_BRANCH} ${SECONDARY_BRANCH} || exit 53 elif [[ "$PRIMARY_BRANCH" == "" ]]; then usage exit 10 # Missing arguments PRIMARY_BRANCH else echo "Rebasing $SECONDARY_BRANCH on top of $PRIMARY_BRANCH" TARGET_BRANCH="${SECONDARY_BRANCH}-rebased-on-top-of-${PRIMARY_BRANCH}" git checkout ${PRIMARY_BRANCH} || exit 41 git checkout -b ${TARGET_BRANCH} || exit 42 git merge ${SECONDARY_BRANCH} ${FF} \ -m "Psycho-rebased branch ${SECONDARY_BRANCH} on top of ${PRIMARY_BRANCH}" if [[ $? == 0 ]]; then git branch -d ${SECONDARY_BRANCH} || exit 43 git branch -m ${TARGET_BRANCH} ${SECONDARY_BRANCH} || exit 44 else echo "Resolve the conflict and run ``${PROGRAM} --continue``." exit 1 fi fi git-extras-4.5.0/bin/git-pull-request000077500000000000000000000031051324217456300175360ustar00rootroot00000000000000#!/usr/bin/env bash # # Echo and exit # abort() { echo >&2 "$@" exit 1 } # # Produce json with , <body>, <head> and <base> # json() { local title="${1//\"/\\\"}" local body="${2//\"/\\\"}" local head="${3//\"/\\\"}" local base="${4//\"/\\\"}" cat <<EOF { "title": "$title", "body": "$body", "head": "$head", "base": "$base" } EOF } # user user=$(git config user.email) if [ -z "$user" ]; then user="$EMAIL" fi test -z "$user" && abort "git config user.email required" # branch branch=${1-$(git symbolic-ref HEAD | sed 's/refs\/heads\///')} remote=$(git config branch."$branch".remote) if [ -z "$remote" ]; then echo 'no upstream found, push to origin as default' remote="origin" fi [ "$remote" == "." ] && abort "the upstream should be a remote branch." # make sure it's pushed git push "$remote" "$branch" || abort "failed to push $branch" remote_url=$(git config remote."$remote".url) if [[ "$remote_url" == git@* ]]; then project=${remote_url##*:} else project=${remote_url#https://*/} fi project=${project%.git} # prompt echo echo " create pull-request for $project '$branch'" echo printf " title: " && read -r title printf " body: " && read -r body printf " base [master]: " && read -r base printf " GitHub two-factor authentication code (leave blank if not set up): " && read -r mfa_code echo # create pull request if [ -z "$base" ] then base="master" fi body=$(json "$title" "$body" "$branch" "$base") curl -u "$user" \ -H "X-GitHub-OTP: $mfa_code" \ "https://api.github.com/repos/$project/pulls" -d "$body" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-reauthor�������������������������������������������������������������������0000775�0000000�0000000�00000010041�13242174563�0016722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash init_variables() { COMMAND=${0#*-} CONFIG=false ALL=false unset OLD_EMAIL unset CORRECT_EMAIL unset CORRECT_NAME TYPE='both' } usage() { cat << EOF usage: git ${COMMAND} [<options>] Options -a, --all rewrite all identities in commits and tags -c, --use-config define correct values from user Git config -e, --correct-email <email> define the correct email to set -n, --correct-name <name> define the correct name to set -o, --old-email <email> rewrite identities matching old email in commits and tags -t, --type <id> define the type of identities affected by the rewrite author, committer, both (default) EOF } error() { if [[ -n "$1" ]]; then local msg=$( echo "error: $1" | sed 's/\\n/\\n /g' ) echo -e "${msg}" >&2 fi usage exit 1 } reauthor() { local author=' if ${ALL} || [ "${GIT_AUTHOR_EMAIL}" = "${OLD_EMAIL}" ]; then [ -z "${CORRECT_EMAIL+x}" ] || export GIT_AUTHOR_EMAIL="${CORRECT_EMAIL}" [ -z "${CORRECT_NAME+x}" ] || export GIT_AUTHOR_NAME="${CORRECT_NAME}" fi ' local committer=' if ${ALL} || [ "${GIT_COMMITTER_EMAIL}" = "${OLD_EMAIL}" ]; then [ -z "${CORRECT_EMAIL+x}" ] || export GIT_COMMITTER_EMAIL="${CORRECT_EMAIL}" [ -z "${CORRECT_NAME+x}" ] || export GIT_COMMITTER_NAME="${CORRECT_NAME}" fi ' local filter case "${TYPE}" in author) filter="${author}" ;; committer) filter="${committer}" ;; both) filter="${author} ${committer}" ;; esac export ALL export OLD_EMAIL export CORRECT_EMAIL export CORRECT_NAME git filter-branch --force --env-filter "${filter}" \ --tag-name-filter cat -- --branches --tags } parse_options() { while [[ "$#" -gt 0 ]]; do case "$1" in --all|-a) ALL=true shift ;; --correct-email|-e) [[ -n "${2+x}" ]] || error 'Missing correct-email value' CORRECT_EMAIL="$2" shift 2 ;; -h) usage exit 0 ;; --correct-name|-n) [[ -n "${2+x}" ]] || error 'Missing correct-name value' CORRECT_NAME="$2" shift 2 ;; --old-email|-o) [[ -n "${2+x}" ]] || error 'Missing old-email value' OLD_EMAIL="$2" shift 2 ;; --type|-t) [[ -n "${2+x}" ]] || error 'Missing type value' TYPE="$2" shift 2 ;; --use-config|-c) CONFIG=true shift ;; *) error "invalid option '$1'" ;; esac done if ${CONFIG}; then # use config values if not explicitly already defined [[ -n "${CORRECT_EMAIL+x}" ]] || CORRECT_EMAIL=$( git config user.email ) [[ -n "${CORRECT_NAME+x}" ]] || CORRECT_NAME=$( git config user.name ) fi } validate_options() { # Either OLD_EMAIL should be set or ALL should be true if [[ -z "${OLD_EMAIL+x}" ]] && ! ${ALL}; then msg="missing target of the rewrite" msg="${msg}\nuse either --old-email option or --all flag" error "${msg}" fi # OLD_EMAIL shouldn't be set if ALL is true as well to prevent misuse if [[ -n "${OLD_EMAIL+x}" ]] && ${ALL}; then msg="ambiguous target of the rewrite" msg="${msg}\nuse either --old-email option or --all flag" error "${msg}" fi # CORRECT_NAME should be either unset or set to non-empty string [[ -n "${CORRECT_NAME-x}" ]] || error "empty name is not allowed" # Either CORRECT_EMAIL or CORRECT_NAME should be set if [[ -z "${CORRECT_EMAIL+x}" ]] && [[ -z "${CORRECT_NAME+x}" ]]; then msg="missing correct email and/or name to set" msg="${msg}\nuse --correct-email and/or --correct-name options" msg="${msg}\nor --use-config flag with user values set in Git config" error "${msg}" fi # TYPE should be a valid identifier if [[ "${TYPE}" != 'both' ]] \ && [[ "${TYPE}" != 'author' ]] \ && [[ "${TYPE}" != 'committer' ]]; then error "invalid type '${TYPE}'" fi } init_variables parse_options "$@" validate_options reauthor �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-rebase-patch���������������������������������������������������������������0000775�0000000�0000000�00000003430�13242174563�0017433�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash # Warn on a dirty work tree. git rev-parse --verify HEAD >/dev/null || exit 1 git update-index -q --ignore-submodules --refresh if ! git diff-files --quiet --ignore-submodules then echo "WARNING (dirty work tree): The patch will only be checked against actual commits." fi # Warn on a dirty index. if ! git diff-index --cached --quiet --ignore-submodules HEAD -- then echo "WARNING (dirty index): The patch will only be checked against actual commits." fi # Use a temporary index. index=$(git_extra_mktemp) cleanup() { rm $index exit 2 } trap cleanup 2 # Go back in history while parent commits are available. echo "Trying to find a commit the patch applies to..." rev=$(git rev-parse HEAD) while [ $? = 0 ] do GIT_INDEX_FILE=$index git read-tree $rev # Try to apply the patch. GIT_INDEX_FILE=$index git apply --cached $1 >/dev/null 2>&1 patch_failed=$? # Do it again, but show the error, if the problem is the patch itself. if [ $patch_failed = 128 ] then GIT_INDEX_FILE=$index git apply --index --check $1 exit $patch_failed fi # The patch applied. Commit and rebase. if [ $patch_failed = 0 ] then # Manufacture a commit. tree=$(GIT_INDEX_FILE=$index git write-tree) commit=$(git commit-tree $tree -p $rev -m "$1") rm $index echo "Patch applied to $(git rev-parse --short $rev) as $(git rev-parse --short $commit)" git cherry-pick $commit exit $? fi rev=$(git rev-parse --verify -q $rev^) done # No compatible commit found. Restore. echo "Failed to find a commit the patch applies to." rm $index exit 1 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-refactor�������������������������������������������������������������������0000775�0000000�0000000�00000000077�13242174563�0016706�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash ALIAS=refactor git feature -a $ALIAS "$@" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-release��������������������������������������������������������������������0000775�0000000�0000000�00000005044�13242174563�0016520�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash set -e hook() { local hook=.git/hooks/$1.sh # compat without extname if test ! -f $hook; then hook=.git/hooks/$1 fi if test -f $hook; then echo "... $1" shift if test -x $hook; then $hook "$@" else . $hook "$@" fi fi } exit_with_msg() { >&2 echo "$1" exit 1 } if test $# -gt 0; then remote='' # check for flags while test $# != 0 do case "$1" in -c) need_changelog=true;; -r) remote=$2; shift ;; -m) msg=$2; shift ;; --semver) test -z "$2" && exit_with_msg "major/minor/patch required for --semver option" semver=$2 shift ;; --no-empty-commit) no_empty_commit=true;; --) shift; hook_args="$hook_args $*"; break;; *) test -z "$version" && version=$1 ;; esac shift done if [ -n "$semver" ]; then if [ -z "$(git tag)" ]; then echo "there is no tag in the git repo" 1>&2 exit 1 fi latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)") if [[ ! "$latest_tag" =~ \ ^([^0-9]*)([0-9]|[1-9][0-9]+)\.([0-9]|[1-9][0-9]+)\.([0-9]|[1-9][0-9]+)(.*) ]]; then echo "the latest tag doesn't match semver format requirement" 1>&2 exit 1 fi case "$semver" in major ) version="${BASH_REMATCH[2]}" ;; minor ) version="${BASH_REMATCH[3]}" ;; patch ) version="${BASH_REMATCH[4]}" ;; * ) echo "invalid semver argument given: $semver" 1>&2 exit 1 ;; esac (( ++version )) case "$semver" in major ) version="${BASH_REMATCH[1]}$version.${BASH_REMATCH[3]}.${BASH_REMATCH[4]}${BASH_REMATCH[5]}" ;; minor ) version="${BASH_REMATCH[1]}${BASH_REMATCH[2]}.$version.${BASH_REMATCH[4]}${BASH_REMATCH[5]}" ;; patch ) version="${BASH_REMATCH[1]}${BASH_REMATCH[2]}.${BASH_REMATCH[3]}.$version${BASH_REMATCH[5]}" ;; esac fi hook_args="$version" if [ -z "$msg" ]; then msg="Release ${version}" fi # shellcheck disable=SC2086 hook pre-release $hook_args \ || exit_with_msg "pre-release hook failed! Cancelling release." echo "... releasing $version" if [ "$need_changelog" = true ]; then git-changelog -t "$version" fi if [ "$no_empty_commit" = true ]; then git commit -a -m "$msg" || true else git commit -a -m "$msg" --allow-empty fi # shellcheck disable=SC2086 git tag $version -a -m "$msg" \ && git push $remote --tags \ && git push $remote \ && hook post-release $hook_args \ && echo "... complete" else echo "tag required" 1>&2 && exit 1 fi ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-rename-branch��������������������������������������������������������������0000775�0000000�0000000�00000000752�13242174563�0017603�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash set -e # Assert there is at least one branch provided test -z $1 && echo "new branch name required." 1>&2 && exit 1 new_branch="$1" old_branch="${2-$(git symbolic-ref --short -q HEAD)}" remote=$(git config branch."$old_branch".remote) git branch -m "$old_branch" "$new_branch" # check if the branch is tracking a remote branch if [[ -n "$remote" && "$remote" != "." ]] then git push "$remote" :"$old_branch" git push --set-upstream "$remote" "$new_branch" fi ����������������������git-extras-4.5.0/bin/git-rename-tag�����������������������������������������������������������������0000775�0000000�0000000�00000000366�13242174563�0017122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash old=$1 new=$2 test -z $old && echo "old tag name required." 1>&2 && exit 1 test -z $new && echo "new tag name required." 1>&2 && exit 1 git tag $new $old git tag -d $old git push origin $new git push origin :refs/tags/$old ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-repl�����������������������������������������������������������������������0000775�0000000�0000000�00000001374�13242174563�0016044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash git version echo "git-extras version ""$(git-extras -v)" echo "type 'ls' to ls files below current directory, '!command' to execute any command or just 'subcommand' to execute any git subcommand" while true; do # Current branch cur=`git symbolic-ref HEAD 2> /dev/null | cut -d/ -f3-` # Prompt if test -n "$cur"; then prompt="git ($cur)> " else prompt="git> " fi # Readline read -e -r -p "$prompt" cmd # EOF test $? -ne 0 && break # History history -s "$cmd" # Built-in commands case $cmd in ls) cmd=ls-files;; "") continue;; quit|exit) break;; esac if [[ $cmd == !* ]]; then eval ${cmd:1} elif [[ $cmd == git* ]]; then eval $cmd else eval git "$cmd" fi done echo ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-reset-file�����������������������������������������������������������������0000775�0000000�0000000�00000000460�13242174563�0017134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash file="$1" commit="$2" if [[ -f $file ]]; then git rm --cached -q -f -- $file if [[ -z $commit ]]; then git checkout HEAD -- $file echo "Reset '$1' to HEAD" else git checkout $commit -- $file echo "Reset '$1' to $commit" fi else echo "File '$1' not found in `pwd`" fi ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-root�����������������������������������������������������������������������0000775�0000000�0000000�00000000542�13242174563�0016061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash git_root() { git rev-parse --show-toplevel } # get the relative path of current path according to root of repo git_root_relative() { git rev-parse --show-prefix } if test $# -eq 0; then git_root else case "$1" in -r|--relative) git_root_relative ;; *) git_root ;; esac fi ��������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-rscp�����������������������������������������������������������������������0000777�0000000�0000000�00000000000�13242174563�0017325�2git-scp���������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-scp������������������������������������������������������������������������0000775�0000000�0000000�00000007534�13242174563�0015673�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash COLOR_RED() { test -t 1 && echo -n "$(tput setaf 1)"; } COLOR_GREEN() { test -t 1 && echo -n "$(tput setaf 2)"; } COLOR_YELLOW(){ test -t 1 && echo -n "$(tput setaf 3)"; } COLOR_BLUE() { test -t 1 && echo -n "$(tput setaf 4)"; } COLOR_RESET() { test -t 1 && echo -n "$(tput sgr 0)"; } function _test_git_scp() { command -v rsync > /dev/null || _error requires rsync command -v git > /dev/null || _error requires git command -v ssh > /dev/null || _error requires ssh command -v php > /dev/null || _info optional php command -v dos2unix > /dev/null || _info optional dos2unix } function set_remote() { remote=$1 if [ $(git remote | grep -c -- ^$remote$) -eq 0 ] then COLOR_RED echo "Remote $remote does not exist in your git config" COLOR_RESET exit 1 fi } # Check file for PHP syntax errors # takes a list of filenames function php_lint() { local error_count=() for i do # check if file exists # check if file ends with ".php" test ! -f "$i" && continue case "$i" in *\.php|*\.phtml) php -l "$i" > /dev/null [ $? -gt 0 ] && error_count[${#error_count[@]}]="$i" ;; esac done # syntax check fails, force exit test ${#error_count[@]} -gt 0 && COLOR_RED && echo "Error: ${#error_count[@]} PHP syntax error found" && echo "${error_count[@]}" | tr " " '\n' && COLOR_RESET && exit 255 return 0 } function _dos2unix() { command -v dos2unix > /dev/null && dos2unix $@ return 0 } function _sanitize() { git config --get-all extras.scp.sanitize | while read i do case $i in php_lint) php_lint $@;; # git config --global --add extras.scp.sanitize php_lint dos2unix) _dos2unix $@;; # git config --global --add extras.scp.sanitize dos2unix esac done return $? } function scp_and_stage { set_remote $1 shift local refhead="$(git rev-parse --quiet --verify $1)" if [ -n "$refhead" ] then shift [ $(git branch --contains "$refhead" | grep -c '\*') -eq 0 ] && _error "refhead provided is not part of current branch" fi if [ $# -ge 1 ] then list=$(git ls-files "$@")" "$(git ls-files -o "$@") elif [ -n "$refhead" ] then git diff --stat $refhead list=$(git diff $refhead --name-only) else git diff list=$(git diff --name-only) fi deleted=$(for i in $list; do [ -f $i ] || echo $i; done) list=$(for i in $list; do [ -f $i ] && echo $i; done) if [ -n "$list" ] then local _TMP=${0///} echo "$list" > $_TMP && _sanitize $list && _info Pushing to $remote \($(git config remote.$remote.url)\) && rsync -rlDv --files-from=$_TMP ./ "$(git config remote.$remote.url)/" && git add --force $list && rm $_TMP fi deleted=$(for i in $deleted; do echo $(git config remote.$remote.url | cut -d: -f2)/$i; done) [ -n "$deleted" ] && COLOR_RED && echo Deleted remote files && ssh $(git config remote.$remote.url | cut -d: -f1) -t "rm $deleted" && echo "$deleted" COLOR_RESET } function reverse_scp() { set_remote $1 shift local _TMP=${0///} echo $@ > $_TMP && rsync -rlDv --files-from=$_TMP "$(git config remote.$remote.url)/" ./ && rm $_TMP } function _info() { COLOR_YELLOW test $# -gt 0 && echo "$@" COLOR_RESET } function _usage() { echo "Usage: git scp -h|help|? git scp <remote> [ref|file..] # scp and stage your files to specified remote git scp <remote> [<ref>] # show diff relative to <ref> and upload unstaged files to <remote> git rscp <remote> [<file|directory>] # copy <remote> files to current working directory " case $1 in -v|verbose|--verbose) grep -A100 '^#* OPTIONS #*$' $0;; esac exit } function _error() { [ $# -eq 0 ] && _usage && exit 0 echo echo ERROR: "$@" echo exit 1 } ### OPTIONS ### case $(basename $0) in git-scp) case $1 in ''|-h|'?'|help|--help) shift; _test_git_scp; _usage $@;; *) scp_and_stage $@;; esac ;; git-rscp) reverse_scp $@;; esac ��������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-sed������������������������������������������������������������������������0000775�0000000�0000000�00000003052�13242174563�0015650�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash usage() { cat <<EOF usage: git sed [ -c ] [ -f <flags> ] <search> <replacement> Run git grep and then send results to sed for replacement with the given flags, if -f is provided. Also runs git commit if -c is provided. EOF } # don't commit by default do_commit() { true } while [ "X$1" != "X" ]; do case "$1" in -c|--commit) if git status --porcelain | grep .; then echo "you need to commit your changes before running with --commit" exit 1 fi do_commit() { git commit -m"replace $search with $replacement actual command: $command" -a } ;; -f|--flags) if [ "X$2" = "X" ]; then usage echo "missing argument for $1" exit 1 fi shift flags=$1 ;; -h|--help) usage exit ;; -*) usage echo "unknown flag: $1" exit 1 ;; *) if [ "X$search" = "X" ]; then search="$1" elif [ "X$replacement" = "X" ]; then replacement="$1" else usage echo "too many arguments: $1" exit 1 fi ;; esac shift done command="git grep -lz '$search' | xargs -0 sed -i 's/$search/$replacement/$flags'" git grep -lz "$search" | xargs -0 sed -i "s/$search/$replacement/$flags" do_commit ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-setup����������������������������������������������������������������������0000775�0000000�0000000�00000000656�13242174563�0016244�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash COMMIT_MESSAGE='Initial commit' if [ "$1" == "-m" ]; then COMMIT_MESSAGE=$2 shift; shift fi gitdirexists(){ if [ -d ".git" ]; then echo ".git directory already exists, aborting" exit 1 fi } dir=$(test -z "$*" && echo "." || echo "$*") mkdir -p "$dir" \ && cd "$dir" \ && gitdirexists \ && git init \ && git add . \ && git commit --allow-empty -m "$COMMIT_MESSAGE" ����������������������������������������������������������������������������������git-extras-4.5.0/bin/git-show-merged-branches�������������������������������������������������������0000775�0000000�0000000�00000000140�13242174563�0021074�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash git branch --no-color --merged | grep -v "\*" | grep -v master | tr -d ' ' ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-show-tree������������������������������������������������������������������0000775�0000000�0000000�00000000131�13242174563�0017005�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash git log --all --graph --decorate --oneline --simplify-by-decoration ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-show-unmerged-branches�����������������������������������������������������0000775�0000000�0000000�00000000143�13242174563�0021442�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash git branch --no-color --no-merged | grep -v "\*" | grep -v master | tr -d ' ' �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-squash���������������������������������������������������������������������0000775�0000000�0000000�00000002115�13242174563�0016400�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash src="$1" msg="$2" is_branch() { git show-ref --verify --quiet "refs/heads/$src" } is_commit_reference() { git rev-parse --verify --quiet "$src" > /dev/null 2>&1 } is_on_current_branch() { local commit_sha=`git rev-parse "$src"` git rev-list HEAD | grep -q -- "$commit_sha" } commit_if_msg_provided() { if test -n "$msg"; then git commit -a -m "$msg" fi } prompt_continuation_if_squashing_master() { if [[ $src =~ ^master$ ]]; then read -p "Warning: squashing '$src'! Continue [y/N]? " -r if ! [[ $REPLY =~ ^[Yy]$ ]]; then echo "Exiting" exit 1 fi fi } squash_branch() { prompt_continuation_if_squashing_master git merge --squash "$src" || exit 1 # quits if `git merge` fails commit_if_msg_provided } squash_current_branch() { git reset --soft "$src" || exit 1 # quits if `git reset` fails commit_if_msg_provided } if `is_branch`; then squash_branch elif `is_commit_reference` && `is_on_current_branch`; then squash_current_branch else echo "Source branch or commit reference required." 1>&2 && exit 1 fi ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-stamp����������������������������������������������������������������������0000775�0000000�0000000�00000002610�13242174563�0016220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash init_variables() { COMMAND=${0#*-} REPLACE=false unset ID unset MSG } usage() { cat << EOF usage: git ${COMMAND} [<options>] <id> [<messages>] Options: -r, --replace replace all previous stamps with same id EOF } error() { if [[ -n "$1" ]]; then local msg=$( echo "error: $1" ) echo -e "${msg}" >&2 fi usage exit 1 } stamp() { local commit_msg=$( git log -1 --pretty=%B ) local stamp_msg [[ -n "${MSG}" ]] && stamp_msg="${ID} ${MSG}" || stamp_msg="${ID}" if ${REPLACE}; then # remove previous stamps with same ID from the commit message commit_msg=$( echo "${commit_msg}" \ | grep --ignore-case --invert-match "^${ID}\b" \ | cat -s ) fi # append the stamp to the commit message in a new paragraph git commit --amend \ --message "${commit_msg}" \ --message "${stamp_msg}" \ > /dev/null # show result git log -1 --pretty=full } parse_options() { while [[ "$#" -gt 0 ]]; do case "$1" in -h) usage exit 0 ;; --replace|-r) REPLACE=true shift ;; *) break ;; esac done ID="$1" MSG="${@:2}" } validate_options() { # ID should be set to non-empty string if [[ -z "${ID}" ]]; then error "missing stamp identifier" fi } init_variables parse_options "$@" validate_options stamp ������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-standup��������������������������������������������������������������������0000775�0000000�0000000�00000014066�13242174563�0016562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash # Code modified from https://github.com/kamranahmedse/git-standup, # under the MIT LICENSE. usage() { cat <<EOS Usage: git standup [-a <author name>] [-w <weekstart-weekend>] [-d <days-ago>] [-m <max-dir-depth>] [-g] [-h] [-f] -a - Specify author to restrict search to -w - Specify weekday range to limit search to -m - Specify the depth of recursive directory search -L - Toggle inclusion of symbolic links in recursive directory search -d - Specify the number of days back to include -D - Specify the date format for "git log" (default: relative) -h - Display this help screen -g - Show if commit is GPG signed (G) or not (N) -f - Fetch the latest commits beforehand Examples: git standup -a "John Doe" -w "MON-FRI" -m 3 EOS } warn() { >&2 echo "${BOLD}${RED}WARNING: $1${NORMAL}" } git rev-parse --show-toplevel > /dev/null 2>&1 in_git_repo=$? # Use colors, but only if connected to a terminal, and that terminal # supports them. if which tput >/dev/null 2>&1; then ncolors=$(tput colors) fi if [[ -t 1 ]] && [[ -n "$ncolors" ]] && [[ "$ncolors" -ge 8 ]] ; then RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" YELLOW="$(tput setaf 3)" BOLD="$(tput bold)" NORMAL="$(tput sgr0)" BOLD=$(tput bold) UNDERLINE=$(tput smul) NORMAL=$(tput sgr0) else RED="" GREEN="" YELLOW="" BOLD="" NORMAL="" BOLD="" UNDERLINE="" NORMAL="" fi # Only enable exit-on-error after the non-critical colorization stuff, # which may fail on systems lacking tput or terminfo set -e while getopts "hgfd:a:w:m:D:L" opt; do case $opt in h) usage exit 0 ;; a) if [[ "$OPTARG" = 'all' ]] ; then AUTHOR=".*" else AUTHOR="$OPTARG" fi ;; d) test -n "$SINCE" && warn "-d option is conflict with -w" if [ "$OPTARG" -lt 1 ]; then >&2 echo "Specify days less than one is invalid" exit 1 fi SINCE="$OPTARG days ago" ;; w) if [ -n "$SINCE" ]; then warn "-w option is conflict with -d" continue fi week_range=${OPTARG} week_start="${week_range%%-*}" week_start="${week_start:="Mon"}" week_end="${week_range##*-}" week_end=${week_end:="Fri"} ## In case it is the start of week, we need to ## show the commits since the last weekend shopt -s nocasematch if [[ "$week_start" == "$(LC_ALL=C date +%a)" ]] ; then SINCE="last $week_end"; fi ;; f) FETCH_LAST_COMMIT=true ;; m) MAXDEPTH=$((OPTARG + 1)) if [ "$MAXDEPTH" -lt 1 ]; then >&2 echo "Specify depth less than one is invalid" exit 1 fi ;; L) INCLUDE_LINKS=-L ;; D) GIT_DATE_FORMAT=${OPTARG} ;; g) GIT_PRETTY_FORMAT="%C(yellow)gpg: %G?%Creset" ;; \?) usage exit 1 ;; esac done shift $((OPTIND-1)) if [[ $# -gt 0 ]]; then warn "please upgrate to new-style interface. Run 'git help standup' to get more info." if [[ $# -gt 3 ]] ; then usage exit 1 fi AUTHOR=$1 SINCE=$2 UNTIL=$3 fi AUTHOR=${AUTHOR:="$(git config user.name)"} SINCE=${SINCE:=yesterday} UNTIL=${UNTIL:=today} FETCH_LAST_COMMIT=${FETCH_LAST_COMMIT:=false} MAXDEPTH=${MAXDEPTH:=2} GIT_PRETTY_FORMAT="%Cred%h%Creset - %s %Cgreen(%cd) %C(bold blue)<%an>%Creset $GIT_PRETTY_FORMAT" GIT_DATE_FORMAT=${GIT_DATE_FORMAT:=relative} GIT_LOG_COMMAND="git --no-pager log \ --all --no-merges --since \"$SINCE\" --until \"$UNTIL\" --author=\"$AUTHOR\" --abbrev-commit --oneline --pretty=format:'$GIT_PRETTY_FORMAT' --date='$GIT_DATE_FORMAT'" ## For when the command has been run in a non-repo directory if [[ $in_git_repo != 0 ]]; then ## Set delimiter to newline for the loop IFS=$'\n' ## Recursively search for git repositories PROJECT_DIRS=$(find $INCLUDE_LINKS . -maxdepth "$MAXDEPTH" -mindepth 0 -name .git) # Fetch the latest commits, if required if [ "$FETCH_LAST_COMMIT" = true ]; then echo "${BOLD}${GREEN}Fetching commits ..${NORMAL}" # Foreach of the project directories, fetch the commits for DIR in $PROJECT_DIRS; do DIR="$(dirname "$DIR")" pushd "$DIR" > /dev/null if [[ -d ".git" ]] ; then echo " ${YELLOW}$(basename "$DIR")${NORMAL}" git fetch --all > /dev/null 2>&1 fi popd > /dev/null done fi # Get the standup details for each of the projects for DIR in $PROJECT_DIRS; do DIR="$(dirname "$DIR")" pushd "$DIR" > /dev/null ## Show the detail only if it is a git repository if [[ -d ".git" || -f ".git" ]] ; then if GITOUT=$(eval ${GIT_LOG_COMMAND}); then ## Only output if there is some activities if [[ ! -z "$GITOUT" ]] ; then echo "${BOLD}${UNDERLINE}${YELLOW}$(basename "$DIR")${NORMAL}" echo "$GITOUT" fi else echo "Repository under $DIR could not be queried." >&2 fi fi popd > /dev/null done else if [ "$FETCH_LAST_COMMIT" = true ]; then echo "${GREEN}Fetching commits ..${NORMAL}" git fetch --all > /dev/null 2>&1 fi if GITOUT=$(eval ${GIT_LOG_COMMAND}); then if [[ ! -z "$GITOUT" ]] ; then echo "$GITOUT" else if [[ $AUTHOR = '.*' ]] ; then AUTHOR="all the contributors" fi echo "${YELLOW}Seems like $AUTHOR did nothing!${NORMAL}" fi fi fi ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-summary��������������������������������������������������������������������0000775�0000000�0000000�00000003015�13242174563�0016571�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash cd "$(git root)" || { echo "Can't cd to top level directory";exit 1; } commit="" test $# -ne 0 && commit=$@ project=${PWD##*/} # # get date for the given <commit> # date() { git log --pretty='format: %ai' $1 | cut -d ' ' -f 2 } # # get active days for the given <commit> # active_days() { date $1 | sort -r | uniq | awk ' { sum += 1 } END { print sum } ' } # # get the commit total # commit_count() { git log --oneline $commit | wc -l | tr -d ' ' } # # total file count # file_count() { git ls-files | wc -l | tr -d ' ' } # # list authors # authors() { # a rare unicode character is used as separator to avoid conflicting with # author name. However, Linux column utility will escape tab if separator # specified, so we do unesaping after it. git shortlog -n -s $commit | LC_ALL=C awk ' { args[NR] = $0; sum += $0 } END { for (i = 1; i <= NR; ++i) { printf "%s♪%2.1f%%\n", args[i], 100 * args[i] / sum } } ' | column -t -s♪ | sed "s/\\\x09/\t/g" } # # fetch repository age from oldest commit # repository_age() { git log --reverse --pretty=oneline --format="%ar" | head -n 1 | LC_ALL=C sed 's/ago//' } # summary if test "$1" = "--line"; then shift git line-summary "$@" echo else echo echo " project : $project" echo " repo age :" $(repository_age) echo " active :" $(active_days) days echo " commits :" $(commit_count) if test "$commit" = ""; then echo " files :" $(file_count) fi echo " authors : " authors echo fi �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-sync�����������������������������������������������������������������������0000775�0000000�0000000�00000003351�13242174563�0016053�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash function _usage() { local command="git sync" cat << EOS Usage: ${command} [<remote> <branch>] ${command} -h | --help Sync local branch with <remote>/<branch>. When <remote> and <branch> are not specified on the command line, upstream of local branch will be used by default. All changes and untracked files and directories will be removed. Examples: Sync with upstream of local branch: ${command} Sync with origin/master: ${command} origin master EOS } function main() { while [ "$1" != "" ]; do case $1 in -h | --help) _usage exit ;; * ) if [ "${remote}" = "" ]; then local remote="$1" elif [ "${branch}" = "" ]; then local branch="$1" else echo -e "Error: too many arguments.\n" _usage exit 1 fi ;; esac shift done local remote_branch if [ "${remote}" = "" ]; then if ! remote_branch="$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)"; then echo "There is no upstream information of local branch." exit 1 fi local branch="$(git rev-parse --abbrev-ref --symbolic-full-name @)" local remote=$(git config "branch.${branch}.remote") elif [ "${branch}" = "" ]; then echo -e "Error: too few arguments.\n" _usage exit 1 else remote_branch="${remote}/${branch}" fi echo -n "Are you sure you want to clean all changes & sync with '${remote_branch}'? [y/N]: " local res read res case "${res}" in "Y" | "y" | "yes" | "Yes" | "YES" ) git fetch "${remote}" "${branch}" && git reset --hard "${remote_branch}" && git clean -d -f -x ;; * ) echo "Canceled." ;; esac } main "$@" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-touch����������������������������������������������������������������������0000775�0000000�0000000�00000000306�13242174563�0016216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash USAGE(){ echo "git touch <filename> [ <filename> . . .]" 1>&2 exit 1 } test $# -lt 1 && USAGE for filename in $@; do touch "$filename" \ && git add "$filename" done ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-undo�����������������������������������������������������������������������0000775�0000000�0000000�00000001313�13242174563�0016040�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash back="^" case "$1" in -h) cat << EOL This will erase any changes since your last commit. If you want to get help info, run "git undo --help" instead. Do you want to continue? [yN]" EOL read -r res case "${res}" in "Y" | "y") test $2 -gt 1 > /dev/null 2>&1 && back="~$2" git reset --hard HEAD$back exit $? ;; * ) exit 0 ;; esac ;; --hard) test $2 -gt 1 > /dev/null 2>&1 && back="~$2" git reset --hard HEAD$back && exit 0; ;; -s|--soft) test $2 -gt 1 > /dev/null 2>&1 && back="~$2" ;; *) test $1 -gt 1 > /dev/null 2>&1 && back="~$1" ;; esac git reset --soft HEAD$back git reset ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/bin/git-unlock���������������������������������������������������������������������0000775�0000000�0000000�00000000215�13242174563�0016366�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash filename=$1 test -z $filename && echo "filename required." 1>&2 && exit 1 git update-index --no-skip-worktree $filename �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/brew-release.patch�����������������������������������������������������������������0000664�0000000�0000000�00000001305�13242174563�0017213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������diff --git a/bin/git-extras b/bin/git-extras index e49cd24..4ae28b5 100755 --- a/bin/git-extras +++ b/bin/git-extras @@ -4,13 +4,12 @@ VERSION="4.3.0" INSTALL_SCRIPT="https://raw.githubusercontent.com/tj/git-extras/master/install.sh" update() { - local bin="$(which git-extras)" - local prefix=${bin%/*/*} - local orig=$PWD - - curl -s $INSTALL_SCRIPT | PREFIX="$prefix" bash /dev/stdin \ - && cd "$orig" \ - && echo "... updated git-extras $VERSION -> $(git extras --version)" + echo "This git-extras installation is managed by Homebrew." + echo "If you'd like to update git-extras, run the following:" + echo + echo " brew upgrade git-extras" + echo + return 1 } updateForWindows() { ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/check_integrity.sh�����������������������������������������������������������������0000775�0000000�0000000�00000003357�13242174563�0017340�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash err() { echo >&2 "$1" exit 1 } check_bash_script() { local cmd="git-$1" test -f "bin/$cmd" \ || err "Bin/$cmd does not exist" test -x "bin/$cmd" \ || err "Run 'chmod +x bin/$cmd' to make it executable" shebang=$(head -n1 "bin/$cmd") [[ "$shebang" =~ \#![[:space:]]*/usr/bin/env[[:space:]]+bash ]] \ || err "Start git-$1 with '#!/usr/bin/env bash'" } check_documentation() { local cmd="git-$1" test -f "man/$cmd.md" || err "create man/$cmd.md" if [ ! -f "man/$cmd.1" ] || [ ! -f "man/$cmd.html" ] then err "Run 'make docs' to create man/$cmd.1 and man/$cmd.html" fi } check_Commands_page() { # These are special cases. All listed together, so we ignore them local whitelist=('bug' 'chore' 'feature' 'refactor') for cmd in ${whitelist[*]}; do test "$1" == "$cmd" && return done grep "\- \[\`git $1\`\](#git-$1)" Commands.md >/dev/null \ || err "Add git-$1 in the list of commands in Commands.md" grep "^## git $1" Commands.md >/dev/null \ || err "Add description of git-$1 in Commands.md" } check_completion() { grep "$1:" etc/git-extras-completion.zsh > /dev/null || \ err "Add git-$1 to the completion list at the end of etc/git-extras-completion.zsh" } check() { check_bash_script "$1" check_documentation "$1" check_Commands_page "$1" check_completion "$1" } usage() { echo >&2 "Usage: ./check_integrity.sh <command-name> [<command-name2> ...]" exit 0 } test $# == 0 && usage for name in "$@"; do name=${name#git-} [[ "$name" == "rscp" || "$name" == "line-summary" ]] && echo "Skip command $name" \ && continue check "$name" done echo 'All done' exit 0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/etc/�������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13242174563�0014371�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/etc/bash_completion.sh�������������������������������������������������������������0000664�0000000�0000000�00000005020�13242174563�0020070�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# bash completion support for git-extras. _git_bug(){ __git_extras_workflow "bug" } _git_changelog(){ local s_opts=( '-a' '-l' '-t' '-f' '-s' '-n' '-p' '-x' '-h' '?' ) local l_opts=( '--all' '--list' '--tag' '--final-tag' '--start-tag' '--no-merges' '--prune-old' '--stdout' '--help' ) local merged_opts_str="" merged_opts_str+="$(printf "%s " "${s_opts[@]}")" merged_opts_str+="$(printf "%s " "${l_opts[@]}")" __gitcomp "$merged_opts_str" } _git_chore(){ __git_extras_workflow "chore" } _git_authors(){ __gitcomp "-l --list --no-email" } _git_contrib(){ # git completion function modified from # https://github.com/markgandolfo/git-bash-completion/blob/master/git-completion.bash contributors="$(git shortlog -s | cut -f2)" local all c s=$'\n' IFS=$'\n' local cur="${COMP_WORDS[COMP_CWORD]}" for c in $contributors; do all="$all$c $s" done COMPREPLY=($(compgen -W "$all" -- "$cur")) } _git_count(){ __gitcomp "--all" } _git_delete_branch(){ __gitcomp "$(__git_heads)" } _git_delete_submodule(){ __gitcomp "$(git submodule status | awk '{print $2}')" } _git_delete_tag(){ __gitcomp "$(__git_tags)" } _git_effort(){ __git_has_doubledash && return case "$cur" in --*) __gitcomp " --above $__git_log_common_options $__git_log_shortlog_options " return ;; esac } _git_extras(){ __gitcomp "--version update" } __git_extras_workflow(){ __gitcomp "$(__git_heads | grep -- ^$1/ | sed s/^$1\\///g) finish" } _git_feature(){ __git_extras_workflow "feature" } _git_graft(){ __gitcomp "$(__git_heads)" } _git_ignore(){ case "$cur" in --*) __gitcomp "--global --local" return ;; -*) __gitcomp "--global --local -g -l" return ;; esac } _git_missing(){ # Suggest all known refs __gitcomp "$(git for-each-ref --format='%(refname:short)')" } _git_psykorebase(){ __gitcomp "$(__git_heads) --continue --no-ff" } _git_reauthor(){ local prev="${COMP_WORDS[COMP_CWORD-1]}" local comp if [[ "${prev}" == '--type' ]] || [[ "${prev}" == '-t' ]]; then comp='author committer full' else comp='--all --correct-email --correct-name --old-email --type --use-config' fi __gitcomp "${comp}" } _git_refactor(){ __git_extras_workflow "refactor" } _git_scp(){ __git_complete_remote_or_refspec } _git_stamp(){ __gitcomp '--replace -r' } _git_rscp(){ __git_complete_remote_or_refspec } _git_squash(){ __gitcomp "$(__git_heads)" } _git_undo(){ __gitcomp "--hard --soft -h -s" } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/etc/git-extras-completion.zsh������������������������������������������������������0000664�0000000�0000000�00000034406�13242174563�0021364�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for git-extras (http://github.com/tj/git-extras). # # This depends on and reuses some of the internals of the _git completion # function that ships with zsh itself. It will not work with the _git that ships # with git. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Alexis GRIMALDI (https://github.com/agrimaldi) # * spacewander (https://github.com/spacewander) # # ------------------------------------------------------------------------------ # Inspirations # ----------- # # * git-extras (http://github.com/tj/git-extras) # * git-flow-completion (http://github.com/bobthecow/git-flow-completion) # # ------------------------------------------------------------------------------ # Internal functions # These are a lot like their __git_* equivalents inside _git __gitex_command_successful () { if (( ${#*:#0} > 0 )); then _message 'not a git repository' return 1 fi return 0 } __gitex_commits() { declare -A commits git log --oneline -15 | sed 's/\([[:alnum:]]\{7\}\) /\1:/' | while read commit do hash=$(echo $commit | cut -d':' -f1) commits[$hash]="$commit" done local ret=1 _describe -t commits commit commits && ret=0 } __gitex_remote_names() { local expl declare -a remote_names remote_names=(${(f)"$(_call_program remotes git remote 2>/dev/null)"}) __git_command_successful || return _wanted remote-names expl remote-name compadd $* - $remote_names } __gitex_tag_names() { local expl declare -a tag_names tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/}) __git_command_successful || return _wanted tag-names expl tag-name compadd $* - $tag_names } __gitex_branch_names() { local expl declare -a branch_names branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/}) __git_command_successful || return _wanted branch-names expl branch-name compadd $* - $branch_names } __gitex_specific_branch_names() { local expl declare -a branch_names branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/}) __git_command_successful || return _wanted branch-names expl branch-name compadd - $branch_names } __gitex_chore_branch_names() { __gitex_specific_branch_names 'chore' } __gitex_feature_branch_names() { __gitex_specific_branch_names 'feature' } __gitex_refactor_branch_names() { __gitex_specific_branch_names 'refactor' } __gitex_bug_branch_names() { __gitex_specific_branch_names 'bug' } __gitex_submodule_names() { local expl declare -a submodule_names submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # ' __git_command_successful || return _wanted submodule-names expl submodule-name compadd $* - $submodule_names } __gitex_author_names() { local expl declare -a author_names author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"}) __git_command_successful || return _wanted author-names expl author-name compadd $* - $author_names } # subcommands _git-authors() { _arguments -C \ '(--list -l)'{--list,-l}'[show authors]' \ '--no-email[without email]' \ } _git-bug() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ ': :->command' \ '*:: :->option-or-argument' && ret=0 case $state in (command) declare -a commands commands=( 'finish:merge bug into the current branch' ) _describe -t commands command commands && ret=0 ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in (finish) _arguments -C \ ':branch-name:__gitex_bug_branch_names' ;; -r|--remote ) _arguments -C \ ':remote-name:__gitex_remote_names' ;; esac return 0 esac _arguments \ '(--remote -r)'{--remote,-r}'[setup remote tracking branch]' } _git-changelog() { _arguments \ '(-l --list)'{-l,--list}'[list commits]' \ } _git-chore() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ ': :->command' \ '*:: :->option-or-argument' && ret=0 case $state in (command) declare -a commands commands=( 'finish:merge and delete the chore branch' ) _describe -t commands command commands && ret=0 ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in (finish) _arguments -C \ ':branch-name:__gitex_chore_branch_names' ;; -r|--remote ) _arguments -C \ ':remote-name:__gitex_remote_names' ;; esac return 0 esac _arguments \ '(--remote -r)'{--remote,-r}'[setup remote tracking branch]' } _git-contrib() { _arguments \ ':author:__gitex_author_names' } _git-count() { _arguments \ '--all[detailed commit count]' } _git-create-branch() { local curcontext=$curcontext state line _arguments -C \ ': :->command' \ '*:: :->option-or-argument' case "$state" in (command) _arguments \ '(--remote -r)'{--remote,-r}'[setup remote tracking branch]' ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in -r|--remote ) _arguments -C \ ':remote-name:__gitex_remote_names' ;; esac esac } _git-delete-branch() { _arguments \ ':branch-name:__gitex_branch_names' } _git-delete-submodule() { _arguments \ ':submodule-name:__gitex_submodule_names' } _git-delete-tag() { _arguments \ ':tag-name:__gitex_tag_names' } _git-effort() { _arguments \ '--above[ignore file with less than x commits]' } _git-extras() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ ': :->command' \ '*:: :->option-or-argument' && ret=0 case $state in (command) declare -a commands commands=( 'update:update git-extras' ) _describe -t commands command commands && ret=0 ;; esac _arguments \ '(-v --version)'{-v,--version}'[show current version]' } _git-feature() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ ': :->command' \ '*:: :->option-or-argument' && ret=0 case $state in (command) declare -a commands commands=( 'finish:merge feature into the current branch' ) _describe -t commands command commands && ret=0 ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in (finish) _arguments -C \ ':branch-name:__gitex_feature_branch_names' ;; -r|--remote ) _arguments -C \ ':remote-name:__gitex_remote_names' ;; esac return 0 esac _arguments \ '(--remote -r)'{--remote,-r}'[setup remote tracking branch]' } _git-graft() { _arguments \ ':src-branch-name:__gitex_branch_names' \ ':dest-branch-name:__gitex_branch_names' } _git-guilt() { _arguments -C \ '(--email -e)'{--email,-e}'[display author emails instead of names]' \ '(--ignore-whitespace -w)'{--ignore-whitespace,-w}'[ignore whitespace only changes]' \ '(--debug -d)'{--debug,-d}'[output debug information]' \ '-h[output usage information]' } _git-ignore() { _arguments -C \ '(--local -l)'{--local,-l}'[show local gitignore]' \ '(--global -g)'{--global,-g}'[show global gitignore]' } _git-ignore() { _arguments -C \ '(--append -a)'{--append,-a}'[append .gitignore]' \ '(--replace -r)'{--replace,-r}'[replace .gitignore]' \ '(--list-in-table -l)'{--list-in-table,-l}'[print available types in table format]' \ '(--list-alphabetically -L)'{--list-alphabetically,-L}'[print available types in alphabetical order]' \ '(--search -s)'{--search,-s}'[search word in available types]' } _git-merge-into() { _arguments '--ff-only[merge only fast-forward]' _arguments \ ':src:__gitex_branch_names' \ ':dest:__gitex_branch_names' } _git-missing() { _arguments \ ':first-branch-name:__gitex_branch_names' \ ':second-branch-name:__gitex_branch_names' } _git-refactor() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ ': :->command' \ '*:: :->option-or-argument' && ret=0 case $state in (command) declare -a commands commands=( 'finish:merge refactor into the current branch' ) _describe -t commands command commands && ret=0 ;; (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in (finish) _arguments -C \ ':branch-name:__gitex_refactor_branch_names' ;; -r|--remote ) _arguments -C \ ':remote-name:__gitex_remote_names' ;; esac return 0 esac _arguments \ '(--remote -r)'{--remote,-r}'[setup remote tracking branch]' } _git-squash() { _arguments \ ':branch-name:__gitex_branch_names' } _git-stamp() { _arguments -C \ '(--replace -r)'{--replace,-r}'[replace stamps with same id]' } _git-standup() { _arguments -C \ '-a[Specify the author of commits. Use "all" to specify all authors.]' \ '-d[Show history since N days ago]' \ '-D[Specify the date format displayed in commit history]' \ '-f[Fetch commits before showing history]' \ '-g[Display GPG signed info]' \ '-h[Display help message]' \ '-L[Enable the inclusion of symbolic links]' \ '-m[The depth of recursive directory search]' } _git-summary() { _arguments '--line[summarize with lines rather than commits]' __gitex_commits } _git-undo(){ _arguments -C \ '(--soft -s)'{--soft,-s}'[only rolls back the commit but changes remain un-staged]' \ '(--hard -h)'{--hard,-h}'[wipes your commit(s)]' } zstyle -g existing_user_commands ':completion:*:*:git:*' user-commands zstyle ':completion:*:*:git:*' user-commands $existing_user_commands \ alias:'define, search and show aliases' \ archive-file:'export the current head of the git repository to an archive' \ authors:'generate authors report' \ back:'undo and stage latest commits' \ bug:'create bug branch' \ bulk:'run bulk commands' \ changelog:'generate a changelog report' \ chore:'create chore branch' \ clear-soft:'soft clean up a repository' \ clear:'rigorously clean up a repository' \ commits-since:'show commit logs since some date' \ contrib:'show user contributions' \ count:'show commit count' \ create-branch:'create branches' \ delete-branch:'delete branches' \ delete-merged-branches:'delete merged branches' \ delete-submodule:'delete submodules' \ delete-tag:'delete tags' \ delta:'lists changed files' \ effort:'show effort statistics on file(s)' \ extras:'awesome git utilities' \ feature:'create/merge feature branch' \ force-clone:'overwrite local repositories with clone' \ fork:'fork a repo on github' \ fresh-branch:'create fresh branches' \ gh-pages:'create the github pages branch' \ graft:'merge and destroy a given branch' \ guilt:'calculate change between two revisions' \ ignore-io:'get sample gitignore file' \ ignore:'add .gitignore patterns' \ info:'returns information on current repository' \ local-commits:'list local commits' \ lock:'lock a file excluded from version control' \ locked:'ls files that have been locked' \ merge-into:'merge one branch into another' \ merge-repo:'merge two repo histories' \ missing:'show commits missing from another branch' \ mr:'checks out a merge request locally' \ obliterate:'rewrite past commits to remove some files' \ pr:'checks out a pull request locally' \ psykorebase:'rebase a branch with a merge commit' \ pull-request:'create pull request to GitHub project' \ reauthor:'replace the author and/or committer identities in commits and tags' \ rebase-patch:'rebases a patch' \ refactor:'create refactor branch' \ release:'commit, tag and push changes to the repository' \ rename-branch:'rename a branch' \ rename-tag:'rename a tag' \ repl:'git read-eval-print-loop' \ reset-file:'reset one file' \ root:'show path of root' \ scp:'copy files to ssh compatible `git-remote`' \ sed:'replace patterns in git-controlled files' \ setup:'set up a git repository' \ show-merged-branches:'show merged branches' \ show-tree:'show branch tree of commit history' \ show-unmerged-branches:'show unmerged branches' \ squash:'import changes from a branch' \ stamp:'stamp the last commit message' \ standup:'recall the commit history' \ summary:'show repository summary' \ sync:'sync local branch with remote branch' \ touch:'touch and add file to the index' \ undo:'remove latest commits' \ unlock:'unlock a file excluded from version control' ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/helper/����������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13242174563�0015075�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/helper/git-extra-utility�����������������������������������������������������������0000775�0000000�0000000�00000000173�13242174563�0020431�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# put all utility functions here # make a temporary file git_extra_mktemp() { mktemp -t "$(basename "$0")".XXXXXXX } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/helper/has-git-commit��������������������������������������������������������������0000664�0000000�0000000�00000000366�13242174563�0017647�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # check whether current directory contains any git commit # has_git_commit() { git rev-parse --short HEAD > /dev/null 2>&1 result=$? if test $result != 0; then >&2 echo 'Not git commit found!' exit $result fi } has_git_commit ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/helper/is-git-repo�����������������������������������������������������������������0000775�0000000�0000000�00000000360�13242174563�0017161�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # check whether current directory is inside a git repository # is_git_repo() { git rev-parse --show-toplevel > /dev/null 2>&1 result=$? if test $result != 0; then >&2 echo 'Not a git repo!' exit $result fi } is_git_repo ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/helper/reset-env�������������������������������������������������������������������0000664�0000000�0000000�00000000132�13242174563�0016724�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# reset environment variables that could interfere with normal usage export GREP_OPTIONS= ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/install.cmd������������������������������������������������������������������������0000664�0000000�0000000�00000010664�13242174563�0015760�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@ECHO OFF :: don't leak env variables into the calling interpreter... setlocal :: better defaults for dealing with quotes... :: You need to escape ! afterwards with ^^! or "^!" SETLOCAL enabledelayedexpansion :: A comment on quotes around file path variables: :: only add quotes around the variable when you use the variable :: as a file path (exists, type, pipe,...) and the parenthesis of a :: for, not when used as a string (-> setting variables) :: more does not work if the codepage is set to unicode 65001 for /F "tokens=*" %%F in ('chcp') do ( for %%A in (%%F) do (set _last=%%A) ) SET CP=%_last:~0% if "!CP:~-1!"=="." ( SET CP=!CP:~0,-1! ) chcp 850 > NUL :: echo %CP% :: not so sane default... SET PREFIX=C:\SCM\PortableGit\mingw64 :: find a git.exe in path and use that as a default dir where /Q git.exe if errorlevel 1 goto :defaultpath for /F "delims=" %%F in ('where git.exe') do ( set bindir=%%~dpF rem break after the first, so that we get the first in path goto :break ) goto :defaultpath :break rem remove the last slash SET bindir=%bindir:~0,-1% for %%G in ("%bindir%") do set installdir=%%~dpG set PREFIX=%installdir%mingw64 goto :foundprefix :defaultpath :: default for Git for Windows 2.x if exist "%ProgramFiles%\Git" ( set PREFIX=%ProgramFiles%\Git\mingw64 ) :foundprefix :: overwrite with whatever the user supplied... IF NOT "%~1"=="" ( REM make it easier for the user to specify a prefix: REM just supplying the git dir is enough... if exist "%~1\mingw64" ( set PREFIX=%~1\mingw64 ) else ( echo Using git install path "%~1" as PREFIX, please make sure it's really a echo path to the mingw64 directory... echo. SET PREFIX=%~1 ) ) :: remove a trailing slash, but only after removing quotes... set PREFIX=!PREFIX:"=! IF %PREFIX:~-1%==\ SET PREFIX=%PREFIX:~0,-1% for %%H in ("%PREFIX%") do set GIT_INSTALL_DIR=%%~dpH set GIT_INSTALL_DIR=!GIT_INSTALL_DIR:"=! IF %GIT_INSTALL_DIR:~-1%==\ SET GIT_INSTALL_DIR=%GIT_INSTALL_DIR:~0,-1% if not exist "%GIT_INSTALL_DIR%\mingw64" ( echo No mingw64 folder found in %GIT_INSTALL_DIR%. echo. echo Please supply a proper "Git for Windows 2.x" install path: echo "install.cmd c:\[git-install-path]" set ERROR=1 goto :exit ) echo Installing to %PREFIX% SET HTMLDIR=%PREFIX%\share\doc\git-doc SET GITEXTRAS=%~dp0 IF NOT EXIST "%PREFIX%\bin" MKDIR "%PREFIX%\bin" :: Check that we can install into that dir or need admin rights... set _testfile=%PREFIX%\bin\testfile_to_check_if_dir_is_writeable-577423947123.~ copy NUL "%_testfile%" >NUL 2>&1 IF EXIST "%_testfile%" ( set IS_WRITEABLE=yes del "%_testfile%" ) else ( set IS_WRITEABLE=no ) if "%IS_WRITEABLE%"=="no" ( echo. echo Directory for binaries ["%PREFIX%\bin"] is not writeable by install.cmd. echo. echo You probably need to run install.cmd from an admin prompt. set ERROR=1 goto :exit ) SET COMMANDS_WITHOUT_REPO=git-alias git-extras git-fork git-setup echo Installing binaries... FOR /R "%GITEXTRAS%\bin" %%i in (*.*) DO ( ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%~ni" TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%~ni" TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%~ni" TYPE "%GITEXTRAS%\helper\is-git-repo" >> "%PREFIX%\bin\%%~ni" MORE +2 "%GITEXTRAS%\bin\%%~ni" >> "%PREFIX%\bin\%%~ni" ) FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO ( ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%i" TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%i" TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%i" MORE +2 "%GITEXTRAS%\bin\%%i" >> "%PREFIX%\bin\%%i" ) echo Installing man pages... set _QUIET=/NP /NFL /NDL /NJS /NJH ROBOCOPY %_QUIET% /IS "%GITEXTRAS%\man" "%HTMLDIR%" *.html IF %ERRORLEVEL% GTR 7 ( echo Not all html docs could be copied to "%GITEXTRAS%\man". echo. echo You probably need to run the install.cmd script from an admin prompt. set ERROR=1 goto :exit ) echo done if not exist "%GIT_INSTALL_DIR%\usr\bin\column.exe" ( where /Q column.exe if errorlevel 1 ( echo. echo column.exe is missing: Not in "%GIT_INSTALL_DIR%\usr\bin" or in PATH! echo. echo "git summary", "git summary-line" and "git ignore-io" do not work without. echo If you need these commands, please install Git for Windows > 2.7.0. echo. ) ) :exit @chcp %CP% > NUL @endlocal enabledelayedexpansion @endlocal @exit /b %ERROR% ����������������������������������������������������������������������������git-extras-4.5.0/install.sh�������������������������������������������������������������������������0000775�0000000�0000000�00000000711�13242174563�0015622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/bash make_install() { if [ -n "$PREFIX" ] then PREFIX="$PREFIX" make install else sudo make install fi } cd /tmp \ && rm -rf ./git-extras \ && echo "Setting up 'git-extras'...." \ && git clone https://github.com/tj/git-extras.git &> /dev/null \ && cd git-extras \ && git checkout \ $(git describe --tags $(git rev-list --tags --max-count=1)) \ &> /dev/null \ && make_install �������������������������������������������������������git-extras-4.5.0/man/�������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13242174563�0014371�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/man/Readme.md����������������������������������������������������������������������0000664�0000000�0000000�00000002627�13242174563�0016117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������How to generate documentation: ================================ ## DESCRIPTION To generate documentation: 1) Start by filling out the 'man-template.md' 2) Then use a program ronn. [Get ronn from github.](https://github.com/rtomayko/ronn) 3) Run ronn: ``` $ ronn <filename>.md ``` 4) Remember, we use the following naming convention for files: ``` git-<command>.html git-<command>.1 git-<command>.md ``` You'll need to rename the html file, as ronn probably inserted a 1 into the filename. ## EXAMPLE ``` $ ronn git-effort.md roff: ./git-effort.1 html: ./git-effort.1.html +man $ mv git-effort.1.html git-effort.html ``` ## SHELL SCRIPT Alternatively you can run the `manning-up.sh` automated shell script included in the man folder. The script will recreate the git-extras index based on the list of .md files available before it runs `ronn` against each one to generate the documents as well as renaming the generated `.html` files to their desired form. ``` $ ./manning-up.sh ``` To only (re)generate a specific .md manual template and have `.1.html` renamed to `.html` yau may also use manning-up.sh. ``` $ ./manning-up.sh git-info.md ``` ## AUTHOR Written by Leila Muhtasib <<muhtasib@gmail.com>> Shell Script by Nick Lombard <<github@jigsoft.co.za>> ## REPORTING BUGS <<https://github.com/tj/git-extras/issues>> ## SEE ALSO <<https://github.com/tj/git-extras>> ���������������������������������������������������������������������������������������������������������git-extras-4.5.0/man/git-alias.1��������������������������������������������������������������������0000664�0000000�0000000�00000002567�13242174563�0016337�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-ALIAS" "1" "June 2017" "" "" . .SH "NAME" \fBgit\-alias\fR \- Define, search and show aliases . .SH "SYNOPSIS" \fBgit\-alias\fR \fBgit\-alias\fR <search\-pattern> \fBgit\-alias\fR <alias\-name> <command> . .SH "DESCRIPTION" List all aliases, show one alias, or set one (global) alias\. . .SH "OPTIONS" <search\-pattern> . .P The pattern used to search aliases\. . .P <alias\-name> . .P The name of the alias to create\. . .P <command> . .P The command for which you are creating an alias\. . .SH "EXAMPLES" Defining a new alias: . .IP "" 4 . .nf $ git alias last "cat\-file commit HEAD" . .fi . .IP "" 0 . .P Providing only one argument, \fBgit\-alias\fR searches for aliases matching the given value: . .IP "" 4 . .nf $ git alias ^la last = cat\-file commit HEAD . .fi . .IP "" 0 . .P \fBgit\-alias\fR will show all aliases if no argument is given: . .IP "" 4 . .nf $ 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> . .fi . .IP "" 0 . .SH "AUTHOR" Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> �����������������������������������������������������������������������������������������������������������������������������������������git-extras-4.5.0/man/git-alias.html�����������������������������������������������������������������0000664�0000000�0000000�00000011716�13242174563�0017137�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE html> <html> <head> <meta http-equiv='content-type' value='text/html;charset=utf8'> <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'> <title>git-alias(1) - Define, search and show aliases
  1. git-alias(1)
  2. git-alias(1)

NAME

git-alias - Define, search and show aliases

SYNOPSIS

git-alias git-alias <search-pattern> git-alias <alias-name> <command>

DESCRIPTION

List all aliases, show one alias, or set one (global) alias.

OPTIONS

<search-pattern>

The pattern used to search aliases.

<alias-name>

The name of the alias to create.

<command>

The command for which you are creating an alias.

EXAMPLES

Defining a new alias:

$ git alias last "cat-file commit HEAD"

Providing only one argument, git-alias searches for aliases matching the given value:

$ git alias ^la
last = cat-file commit HEAD

git-alias will show all aliases if no argument is given:

$ 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>

AUTHOR

Written by Jonhnny Weslley <jw@jonhnnyweslley.net>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. June 2017
  2. git-alias(1)
git-extras-4.5.0/man/git-alias.md000066400000000000000000000022551324217456300165710ustar00rootroot00000000000000git-alias(1) -- Define, search and show aliases =============================================== ## SYNOPSIS `git-alias` `git-alias` <search-pattern> `git-alias` <alias-name> <command> ## DESCRIPTION List all aliases, show one alias, or set one (global) alias. ## OPTIONS <search-pattern> The pattern used to search aliases. <alias-name> The name of the alias to create. <command> The command for which you are creating an alias. ## EXAMPLES Defining a new alias: $ git alias last "cat-file commit HEAD" Providing only one argument, `git-alias` searches for aliases matching the given value: $ git alias ^la last = cat-file commit HEAD `git-alias` will show all aliases if no argument is given: $ 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> ## AUTHOR Written by Jonhnny Weslley <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-archive-file.1000066400000000000000000000016331324217456300175750ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-ARCHIVE\-FILE" "1" "December 2016" "" "Git Extras" . .SH "NAME" \fBgit\-archive\-file\fR \- Export the current HEAD of the git repository to an archive . .SH "SYNOPSIS" \fBgit\-archive\-file\fR . .SH "DESCRIPTION" Export the current HEAD of the repository into an archive with an identifiable and unique name\. . .SH "OPTIONS" This command does not take any options\. . .SH "EXAMPLES" Archive naming conventions: . .P On any branch: \fBgit\-extras\.1\.7\.0\-110\-gafefba7\.branch\-name\.zip\fR . .P On master branch: \fBgit\-extras\.1\.7\.0\-110\-gafefba7\.zip\fR . .P On a detached HEAD (e\.g\. a tag): \fBgit\-extras\.1\.7\.0\.zip\fR . .SH "AUTHOR" Written by Philipp Klose <\fIme@thehippo\.de\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-archive-file.html000066400000000000000000000106521324217456300204020ustar00rootroot00000000000000 git-archive-file(1) - Export the current HEAD of the git repository to an archive
  1. git-archive-file(1)
  2. Git Extras
  3. git-archive-file(1)

NAME

git-archive-file - Export the current HEAD of the git repository to an archive

SYNOPSIS

git-archive-file

DESCRIPTION

Export the current HEAD of the repository into an archive with an identifiable and unique name.

OPTIONS

This command does not take any options.

EXAMPLES

Archive naming conventions:

On any branch: git-extras.1.7.0-110-gafefba7.branch-name.zip

On master branch: git-extras.1.7.0-110-gafefba7.zip

On a detached HEAD (e.g. a tag): git-extras.1.7.0.zip

AUTHOR

Written by Philipp Klose <me@thehippo.de>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2016
  2. git-archive-file(1)
git-extras-4.5.0/man/git-archive-file.md000066400000000000000000000013431324217456300200330ustar00rootroot00000000000000git-archive-file(1) -- Export the current HEAD of the git repository to an archive =============================================== ## SYNOPSIS `git-archive-file` ## DESCRIPTION Export the current HEAD of the repository into an archive with an identifiable and unique name. ## OPTIONS This command does not take any options. ## EXAMPLES Archive naming conventions: On any branch: `git-extras.1.7.0-110-gafefba7.branch-name.zip` On master branch: `git-extras.1.7.0-110-gafefba7.zip` On a detached HEAD (e.g. a tag): `git-extras.1.7.0.zip` ## AUTHOR Written by Philipp Klose <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-authors.1000066400000000000000000000025621324217456300167260ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-AUTHORS" "1" "October 2016" "" "" . .SH "NAME" \fBgit\-authors\fR \- Generate authors report . .SH "SYNOPSIS" \fBgit\-authors\fR [\-l, \-\-list] [\-\-no\-email] . .SH "DESCRIPTION" Populates the file matching \fIauthors|contributors \-i\fR with the authors of commits, according to the number of commits per author\. Opens the file in \fB$EDITOR\fR when set\. . .P See the "MAPPING AUTHORS" section of \fBgit\-shortlog\fR(1) to coalesce together commits by the same person\. . .SH "OPTIONS" \-l, \-\-list . .P Show authors\. . .P \-\-no\-email . .P Don\'t show authors\' email\. . .SH "EXAMPLES" . .TP Updating AUTHORS file: . .IP $ git authors . .TP Listing authors: . .IP $ git authors \-\-list . .IP "" 4 . .nf TJ Holowaychuk hemanth\.hm Jonhnny Weslley nickl\- Leila Muhtasib . .fi . .IP "" 0 . .TP Listing authors without email: . .IP $ git authors \-\-list \-\-no\-email . .IP "" 4 . .nf TJ Holowaychuk hemanth\.hm Jonhnny Weslley nickl\- Leila Muhtasib . .fi . .IP "" 0 . .SH "AUTHOR" Written by Titus Wormer <\fItituswormer@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-authors.html000066400000000000000000000117571324217456300175400ustar00rootroot00000000000000 git-authors(1) - Generate authors report
  1. git-authors(1)
  2. git-authors(1)

NAME

git-authors - Generate authors report

SYNOPSIS

git-authors [-l, --list] [--no-email]

DESCRIPTION

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 of git-shortlog(1) to coalesce together commits by the same person.

OPTIONS

-l, --list

Show authors.

--no-email

Don't show authors' email.

EXAMPLES

Updating AUTHORS file:

$ git authors

Listing authors:

$ git authors --list

TJ Holowaychuk <tj@vision-media.ca>
hemanth.hm <hemanth.hm@gmail.com>
Jonhnny Weslley <jw@jonhnnyweslley.net>
nickl- <github@jigsoft.co.za>
Leila Muhtasib <muhtasib@gmail.com>
Listing authors without email:

$ git authors --list --no-email

TJ Holowaychuk
hemanth.hm
Jonhnny Weslley
nickl-
Leila Muhtasib

AUTHOR

Written by Titus Wormer <tituswormer@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. October 2016
  2. git-authors(1)
git-extras-4.5.0/man/git-authors.md000066400000000000000000000023071324217456300171630ustar00rootroot00000000000000git-authors(1) -- Generate authors report ================================================= ## SYNOPSIS `git-authors` [-l, --list] [--no-email] ## DESCRIPTION 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 of **git-shortlog**(1) to coalesce together commits by the same person. ## OPTIONS -l, --list Show authors. --no-email Don't show authors' email. ## EXAMPLES * Updating AUTHORS file: $ git authors * Listing authors: $ git authors --list ``` TJ Holowaychuk hemanth.hm Jonhnny Weslley nickl- Leila Muhtasib ``` * Listing authors without email: $ git authors --list --no-email ``` TJ Holowaychuk hemanth.hm Jonhnny Weslley nickl- Leila Muhtasib ``` ## AUTHOR Written by Titus Wormer <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-back.1000066400000000000000000000014631324217456300161400ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-BACK" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-back\fR \- Undo and Stage latest commits . .SH "SYNOPSIS" \fBgit\-back\fR [] . .SH "DESCRIPTION" Removes the latest commits, and add their changes to your staging area\. . .SH "OPTIONS" . .P Number of commits to remove\. Defaults to \fI1\fR, thus remove the latest commit\. . .SH "EXAMPLES" Removes the latest commit\. . .IP "" 4 . .nf $ git back . .fi . .IP "" 0 . .P Remove the latest 3 commits: . .IP "" 4 . .nf $ git back 3 . .fi . .IP "" 0 . .SH "AUTHOR" Written by Kenneth Reitz <\fIme@kennethreitz\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-back.html000066400000000000000000000105141324217456300167410ustar00rootroot00000000000000 git-back(1) - Undo and Stage latest commits
  1. git-back(1)
  2. git-back(1)

NAME

git-back - Undo and Stage latest commits

SYNOPSIS

git-back [<commitcount>]

DESCRIPTION

Removes the latest commits, and add their changes to your staging area.

OPTIONS

<commitcount>

Number of commits to remove. Defaults to 1, thus remove the latest commit.

EXAMPLES

Removes the latest commit.

$ git back

Remove the latest 3 commits:

$ git back 3

AUTHOR

Written by Kenneth Reitz <me@kennethreitz.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-back(1)
git-extras-4.5.0/man/git-back.md000066400000000000000000000012061324217456300163730ustar00rootroot00000000000000git-back(1) -- Undo and Stage latest commits ============================================ ## SYNOPSIS `git-back` [<commitcount>] ## DESCRIPTION Removes the latest commits, and add their changes to your staging area. ## OPTIONS <commitcount> Number of commits to remove. Defaults to *1*, thus remove the latest commit. ## EXAMPLES Removes the latest commit. $ git back Remove the latest 3 commits: $ git back 3 ## AUTHOR Written by Kenneth Reitz <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-bug.1000066400000000000000000000017641324217456300160210ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-BUG" "1" "July 2017" "" "" . .SH "NAME" \fBgit\-bug\fR \- Create bug branch . .SH "SYNOPSIS" \fBgit\-bug\fR [\-r|\-\-remote [remote_name]] [finish] . .SH "DESCRIPTION" Create the given bug branch . .SH "OPTIONS" <\-r|\-\-remote [remote_name]> . .P Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\. . .P . .P Merge and delete the bug branch\. . .P <\-r . .P . .P The name of the bug branch\. . .SH "EXAMPLES" . .nf $ git bug bug\-123456 \.\.\. $ git commit \-m "Some changes" \.\.\. $ git checkout master $ git bug finish bug\-123456 $ git bug \-r 12345 . .fi . .SH "AUTHOR" Written by Jesús Espino <\fIjespinog@gmail\.com\fR> . .br Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-bug.html000066400000000000000000000115241324217456300166200ustar00rootroot00000000000000 git-bug(1) - Create bug branch
  1. git-bug(1)
  2. git-bug(1)

NAME

git-bug - Create bug branch

SYNOPSIS

git-bug [-r|--remote [remote_name]] [finish] <name>

DESCRIPTION

Create the given bug branch

OPTIONS

<-r|--remote [remote_name]>

Setup a remote tracking branch using remote_name. If remote_name is not supplied, use origin by default.

<finish>

Merge and delete the bug branch.

<-r

<name>

The name of the bug branch.

EXAMPLES

$ git bug bug-123456
...
$ git commit -m "Some changes"
...
$ git checkout master
$ git bug finish bug-123456

$ git bug -r 12345

AUTHOR

Written by Jesús Espino <jespinog@gmail.com>
Modified by Mark Pitman <mark.pitman@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2017
  2. git-bug(1)
git-extras-4.5.0/man/git-bug.md000066400000000000000000000015571324217456300162610ustar00rootroot00000000000000git-bug(1) -- Create bug branch =============================== ## SYNOPSIS `git-bug` [-r|--remote [remote_name]] [finish] <name> ## DESCRIPTION Create the given bug branch ## OPTIONS <-r|--remote [remote_name]> Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. <finish> Merge and delete the bug branch. <-r <name> The name of the bug branch. ## EXAMPLES $ git bug bug-123456 ... $ git commit -m "Some changes" ... $ git checkout master $ git bug finish bug-123456 $ git bug -r 12345 ## AUTHOR Written by Jesús Espino <> Modified by Mark Pitman <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-bulk.1000066400000000000000000000053671324217456300162040ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-BULK" "1" "July 2017" "" "Git Extras" . .SH "NAME" \fBgit\-bulk\fR \- Run git commands on multiple repositories . .SH "SYNOPSIS" usage: usage: git bulk [\-g] ([\-a]|[\-w ]) git bulk \-\-addworkspace git bulk \-\-removeworkspace git bulk \-\-addcurrent git bulk \-\-purge git bulk \-\-listall . .SH "DESCRIPTION" git bulk adds convenient support for operations that you want to execute on multiple git repositories\. . .IP "\(bu" 4 simply register workspaces that contain multiple git repos in their directory structure . .IP "\(bu" 4 run any git command on the repositories of the registered workspaces in one command to \fBgit bulk\fR . .IP "\(bu" 4 use the "guarded mode" to check on each execution . .IP "" 0 . .SH "OPTIONS" \-a . .P Run a git command on all workspaces and their repositories\. . .P \-g . .P Ask the user for confirmation on every execution\. . .P \-w . .P Run the git command on the specified workspace\. The workspace must be registered\. . .P . .P Any git Command you wish to execute on the repositories\. . .P \-\-addworkspace . .P Register a workspace for bulk operations\. All repositories in the diretories below get registered under this workspace with the name \. must be absolute path\. . .P \-\-removeworkspace . .P Remove the workspace with the logical name \. . .P \-\-addcurrent . .P Adds the current directory as workspace to git bulk operations\. The workspace is referenced with its logical name \. . .P git bulk \-\-purge . .P Removes all defined repository locations\. . .P git bulk \-\-listall . .P List all registered repositories\. . .SH "EXAMPLES" . .nf Register a workspace so that git bulk knows about it: $ git bulk \-\-addworkspace personal ~/workspaces/personal Register the current directory as a workspace to git bulk: $ git bulk \-\-addcurrent personal List all registered workspaces: $ git bulk \-\-listall Run a git command on the repositories of the current workspace: $ git bulk fetch Run a git command on the specified workspace and its repositories: $ git bulk \-w personal fetch Run a git command but ask the user for confirmation on every execution (guarded mode): $ git bulk \-g fetch Remove a registered workspace: $ git bulk \-\-removeworkspace personal Remove all registered workspaces: $ git bulk \-\-purge . .fi . .SH "AUTHOR" Written by Niklas Schlimm <\fIns103@hotmail\.de\fR> . .SH "REPORTING BUGS" . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-bulk.html000066400000000000000000000144711324217456300170040ustar00rootroot00000000000000 git-bulk(1) - Run git commands on multiple repositories
  1. git-bulk(1)
  2. Git Extras
  3. git-bulk(1)

NAME

git-bulk - Run git commands on multiple repositories

SYNOPSIS

usage: usage: git bulk [-g] ([-a]|[-w <ws-name>]) <git command> git bulk --addworkspace <ws-name> <ws-root-directory> git bulk --removeworkspace <ws-name> git bulk --addcurrent <ws-name> git bulk --purge git bulk --listall

DESCRIPTION

git bulk adds convenient support for operations that you want to execute on multiple git repositories.

  • simply register workspaces that contain multiple git repos in their directory structure
  • run any git command on the repositories of the registered workspaces in one command to git bulk
  • use the "guarded mode" to check on each execution

OPTIONS

-a

Run a git command on all workspaces and their repositories.

-g

Ask the user for confirmation on every execution.

-w <ws-name>

Run the git command on the specified workspace. The workspace must be registered.

<git command>

Any git Command you wish to execute on the repositories.

--addworkspace <ws-name> <ws-root-directory>

Register a workspace for bulk operations. All repositories in the diretories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path.

--removeworkspace <ws-name>

Remove the workspace with the logical name <ws-name>.

--addcurrent <ws-name>

Adds the current directory as workspace to git bulk operations. The workspace is referenced with its logical name <ws-name>.

git bulk --purge

Removes all defined repository locations.

git bulk --listall

List all registered repositories.

EXAMPLES

Register a workspace so that git bulk knows about it:

$ git bulk --addworkspace personal ~/workspaces/personal

Register the current directory as a workspace to git bulk:

$ git bulk --addcurrent personal

List all registered workspaces:

$ git bulk --listall

Run a git command on the repositories of the current workspace:

$ git bulk fetch

Run a git command on the specified workspace and its repositories:

$ git bulk -w personal fetch

Run a git command but ask the user for confirmation on every execution (guarded mode):

$ git bulk -g fetch

Remove a registered workspace:

$ git bulk --removeworkspace personal

Remove all registered workspaces:

$ git bulk --purge

AUTHOR

Written by Niklas Schlimm <ns103@hotmail.de>

REPORTING BUGS

<https://github.com/nschlimm/git-bulk>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2017
  2. git-bulk(1)
git-extras-4.5.0/man/git-bulk.md000066400000000000000000000052571324217456300164420ustar00rootroot00000000000000git-bulk(1) -- Run git commands on multiple repositories ======================================================== ## SYNOPSIS usage: usage: git bulk [-g] ([-a]|[-w <ws-name>]) <git command> git bulk --addworkspace <ws-name> <ws-root-directory> git bulk --removeworkspace <ws-name> git bulk --addcurrent <ws-name> git bulk --purge git bulk --listall ## DESCRIPTION git bulk adds convenient support for operations that you want to execute on multiple git repositories. - simply register workspaces that contain multiple git repos in their directory structure - run any git command on the repositories of the registered workspaces in one command to `git bulk` - use the "guarded mode" to check on each execution ## OPTIONS -a Run a git command on all workspaces and their repositories. -g Ask the user for confirmation on every execution. -w <ws-name> Run the git command on the specified workspace. The workspace must be registered. <git command> Any git Command you wish to execute on the repositories. --addworkspace <ws-name> <ws-root-directory> Register a workspace for bulk operations. All repositories in the diretories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path. --removeworkspace <ws-name> Remove the workspace with the logical name <ws-name>. --addcurrent <ws-name> Adds the current directory as workspace to git bulk operations. The workspace is referenced with its logical name <ws-name>. git bulk --purge Removes all defined repository locations. git bulk --listall List all registered repositories. ## EXAMPLES Register a workspace so that git bulk knows about it: $ git bulk --addworkspace personal ~/workspaces/personal Register the current directory as a workspace to git bulk: $ git bulk --addcurrent personal List all registered workspaces: $ git bulk --listall Run a git command on the repositories of the current workspace: $ git bulk fetch Run a git command on the specified workspace and its repositories: $ git bulk -w personal fetch Run a git command but ask the user for confirmation on every execution (guarded mode): $ git bulk -g fetch Remove a registered workspace: $ git bulk --removeworkspace personal Remove all registered workspaces: $ git bulk --purge ## AUTHOR Written by Niklas Schlimm <> ## REPORTING BUGS <https://github.com/nschlimm/git-bulk> ## SEE ALSO <> git-extras-4.5.0/man/git-changelog.1000066400000000000000000000103141324217456300171620ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CHANGELOG" "1" "November 2017" "" "" . .SH "NAME" \fBgit\-changelog\fR \- Generate a changelog report . .SH "SYNOPSIS" \fBgit\-changelog\fR [options] [] . .br \fBgit\-changelog\fR {\-h | \-\-help | ?} . .SH "DESCRIPTION" Generates a changelog from git(1) tags (annotated or lightweight) and commit messages\. Existing changelog files with filenames that begin with \fIChange\fR or \fIHistory\fR 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 \fB$EDITOR\fR when set\. . .P 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 specifying one or both of the range options (\-f|\-\-final\-tag and \-s|\-\-start\-tag)\. . .P You could customize the changelog format via some git config options\. . .IP "\(bu" 4 \fBgit config changelog\.format $format\fR controls the format of each commit\. It will be passed as \fBgit log \-\-pretty=format:$format\fR\. The default value is \fB* %s\fR\. . .IP "\(bu" 4 \fBgit config changelog\.mergeformat $format\fR is like changelog\.format but only used when \fB\-\-merges\-only\fR is specified\. The default value is \fB* %s%n%w(64,4,4)%b\fR\. . .IP "" 0 . .SH "OPTIONS" . .P The name of the output file\. By default the new file will be \fIHistory\.md\fR unless an existing changelog is detected in which case the existing file will be updated\. . .P \-a, \-\-all . .P Retrieve all commits\. Ignores \-s|\-\-start\-tag and \-f|\-\-final\-tag options (if set)\. . .P \-l, \-\-list . .P Show commits in list format (without titles, dates)\. . .P \-t, \-\-tag . .P Specify a tag label to use for most\-recent (untagged) commits\. . .P \-f, \-\-final\-tag . .P When specifying a range, the newest tag at which point commit retrieval will end\. Commits will be returned from the very first commit until the final tag unless a start tag is also specified\. . .P \-s, \-\-start\-tag . .P When specifying a range, the oldest tag to retrieve commits from\. Commits will be returned from the start tag to now unless a final tag is also specified\. . .P \-n, \-\-no\-merges . .P Filters out merge commits (commits with more than 1 parent) from generated changelog\. . .P \-m, \-\-merges\-only . .P Uses only merge commits (commits with more than 1 parent) for generated changelog\. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge\. . .P \-p, \-\-prune\-old . .P Replace existing changelog entirely with newly generated content, thereby disabling the default behavior of appending the content of any detected changelog to the end of newly generated content\. . .P \-x, \-\-stdout . .P Write output to stdout instead of to a new changelog file\. . .P \-h, \-\-help, ? . .P Show a help message with basic usage information\. . .SH "EXAMPLES" . .TP Updating existing file or creating a new \fIHistory\.md\fR file with pretty formatted output: . .IP $ git changelog . .TP Listing commits from the current version: . .IP $ git changelog \-\-list . .TP Listing a range of commits from 2\.1\.0 to now: . .IP $ git changelog \-\-list \-\-start\-tag 2\.1\.0 . .TP Listing a pretty formatted version of the same: . .IP $ git changelog \-\-start\-tag 2\.1\.0 . .TP Listing a range of commits from initial commit to 2\.1\.0: . .IP $ git changelog \-\-list \-\-final\-tag 2\.1\.0 . .TP Listing a pretty formatted range of commits between 0\.5\.0 and 1\.0\.0: . .IP $ git changelog \-\-start\-tag 0\.5\.0 \-\-final\-tag 1\.0\.0 . .TP Specifying a file for output: . .IP $ git changelog ChangeLog\.md . .TP And if an existing Changelog exists, replace its contents entirely: . .IP $ git changelog \-\-prune\-old . .SH "AUTHOR" Written by Mark Eissler <\fImark@mixtur\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-changelog.html000066400000000000000000000177341324217456300200030ustar00rootroot00000000000000 git-changelog(1) - Generate a changelog report
  1. git-changelog(1)
  2. git-changelog(1)

NAME

git-changelog - Generate a changelog report

SYNOPSIS

git-changelog [options] [<file>]
git-changelog {-h | --help | ?}

DESCRIPTION

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.

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 specifying one or both of the range options (-f|--final-tag and -s|--start-tag).

You could customize the changelog format via some git config options.

  • git config changelog.format $format controls the format of each commit. It will be passed as git log --pretty=format:$format. The default value is * %s.

  • git config changelog.mergeformat $format is like changelog.format but only used when --merges-only is specified. The default value is * %s%n%w(64,4,4)%b.

OPTIONS

<file>

The name of the output file. By default the new file will be History.md unless an existing changelog is detected in which case the existing file will be updated.

-a, --all

Retrieve all commits. Ignores -s|--start-tag and -f|--final-tag options (if set).

-l, --list

Show commits in list format (without titles, dates).

-t, --tag

Specify a tag label to use for most-recent (untagged) commits.

-f, --final-tag

When specifying a range, the newest tag at which point commit retrieval will end. Commits will be returned from the very first commit until the final tag unless a start tag is also specified.

-s, --start-tag

When specifying a range, the oldest tag to retrieve commits from. Commits will be returned from the start tag to now unless a final tag is also specified.

-n, --no-merges

Filters out merge commits (commits with more than 1 parent) from generated changelog.

-m, --merges-only

Uses only merge commits (commits with more than 1 parent) for generated changelog. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge.

-p, --prune-old

Replace existing changelog entirely with newly generated content, thereby disabling the default behavior of appending the content of any detected changelog to the end of newly generated content.

-x, --stdout

Write output to stdout instead of to a new changelog file.

-h, --help, ?

Show a help message with basic usage information.

EXAMPLES

Updating existing file or creating a new History.md file with pretty formatted output:

$ git changelog

Listing commits from the current version:

$ git changelog --list

Listing a range of commits from 2.1.0 to now:

$ git changelog --list --start-tag 2.1.0

Listing a pretty formatted version of the same:

$ git changelog --start-tag 2.1.0

Listing a range of commits from initial commit to 2.1.0:

$ git changelog --list --final-tag 2.1.0

Listing a pretty formatted range of commits between 0.5.0 and 1.0.0:

$ git changelog --start-tag 0.5.0 --final-tag 1.0.0

Specifying a file for output:

$ git changelog ChangeLog.md

And if an existing Changelog exists, replace its contents entirely:

$ git changelog --prune-old

AUTHOR

Written by Mark Eissler <mark@mixtur.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. November 2017
  2. git-changelog(1)
git-extras-4.5.0/man/git-changelog.md000066400000000000000000000075111324217456300174270ustar00rootroot00000000000000git-changelog(1) -- Generate a changelog report =============================================== ## SYNOPSIS `git-changelog` [options] [<file>]
`git-changelog` {-h | --help | ?} ## DESCRIPTION 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. 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 specifying one or both of the range options (-f|--final-tag and -s|--start-tag). You could customize the changelog format via some git config options. * `git config changelog.format $format` controls the format of each commit. It will be passed as `git log --pretty=format:$format`. The default value is ` * %s`. * `git config changelog.mergeformat $format` is like changelog.format but only used when `--merges-only` is specified. The default value is `* %s%n%w(64,4,4)%b`. ## OPTIONS <file> The name of the output file. By default the new file will be _History.md_ unless an existing changelog is detected in which case the existing file will be updated. -a, --all Retrieve all commits. Ignores -s|--start-tag and -f|--final-tag options (if set). -l, --list Show commits in list format (without titles, dates). -t, --tag Specify a tag label to use for most-recent (untagged) commits. -f, --final-tag When specifying a range, the newest tag at which point commit retrieval will end. Commits will be returned from the very first commit until the final tag unless a start tag is also specified. -s, --start-tag When specifying a range, the oldest tag to retrieve commits from. Commits will be returned from the start tag to now unless a final tag is also specified. -n, --no-merges Filters out merge commits (commits with more than 1 parent) from generated changelog. -m, --merges-only Uses only merge commits (commits with more than 1 parent) for generated changelog. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge. -p, --prune-old Replace existing changelog entirely with newly generated content, thereby disabling the default behavior of appending the content of any detected changelog to the end of newly generated content. -x, --stdout Write output to stdout instead of to a new changelog file. -h, --help, ? Show a help message with basic usage information. ## EXAMPLES * Updating existing file or creating a new _History.md_ file with pretty formatted output: $ git changelog * Listing commits from the current version: $ git changelog --list * Listing a range of commits from 2.1.0 to now: $ git changelog --list --start-tag 2.1.0 * Listing a pretty formatted version of the same: $ git changelog --start-tag 2.1.0 * Listing a range of commits from initial commit to 2.1.0: $ git changelog --list --final-tag 2.1.0 * Listing a pretty formatted range of commits between 0.5.0 and 1.0.0: $ git changelog --start-tag 0.5.0 --final-tag 1.0.0 * Specifying a file for output: $ git changelog ChangeLog.md * And if an existing Changelog exists, replace its contents entirely: $ git changelog --prune-old ## AUTHOR Written by Mark Eissler <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-chore.1000066400000000000000000000021701324217456300163340ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CHORE" "1" "July 2017" "" "" . .SH "NAME" \fBgit\-chore\fR \- Create chore branch . .SH "SYNOPSIS" \fBgit\-chore\fR [\-r|\-\-remote [remote_name]] [finish] . .SH "DESCRIPTION" Create the given chore branch . .SH "OPTIONS" <\-r|\-\-remote [remote_name]> . .P Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\. . .P . .P Merge and delete the chore branch\. . .P . .P The name of the chore branch\. . .SH "EXAMPLES" . .nf $ git chore chore\-123456 \.\.\. $ git commit \-m "Some changes" \.\.\. $ git checkout master $ git chore finish chore\-123456 $ git chore \-r upstream 123456 . .fi . .SH "AUTHOR" Written by Chris Hall <\fIchristopher\.k\.hall@gmail\.com\fR> from bug/feature/refactor commands originally written by Jesús Espino <\fIjespinog@gmail\.com\fR> . .br Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-chore.html000066400000000000000000000125221324217456300171420ustar00rootroot00000000000000 git-chore(1) - Create chore branch
  1. git-chore(1)
  2. git-chore(1)

NAME

git-chore - Create chore branch

SYNOPSIS

git-chore [-r|--remote [remote_name]] [finish] <name>

DESCRIPTION

Create the given chore branch

OPTIONS

<-r|--remote [remote_name]>

Setup a remote tracking branch using remote_name. If remote_name is not supplied, use origin by default.

<finish>

Merge and delete the chore branch.

<name>

The name of the chore branch.

EXAMPLES

$ git chore chore-123456
...
$ git commit -m "Some changes"
...
$ git checkout master
$ git chore finish chore-123456

$ git chore -r upstream 123456

AUTHOR

Written by Chris Hall <christopher.k.hall@gmail.com> from bug/feature/refactor commands originally written by Jesús Espino <jespinog@gmail.com>
Modified by Mark Pitman <mark.pitman@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2017
  2. git-chore(1)
git-extras-4.5.0/man/git-chore.md000066400000000000000000000017601324217456300166000ustar00rootroot00000000000000git-chore(1) -- Create chore branch =============================== ## SYNOPSIS `git-chore` [-r|--remote [remote_name]] [finish] <name> ## DESCRIPTION Create the given chore branch ## OPTIONS <-r|--remote [remote_name]> Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. <finish> Merge and delete the chore branch. <name> The name of the chore branch. ## EXAMPLES $ git chore chore-123456 ... $ git commit -m "Some changes" ... $ git checkout master $ git chore finish chore-123456 $ git chore -r upstream 123456 ## AUTHOR Written by Chris Hall <> from bug/feature/refactor commands originally written by Jesús Espino <> Modified by Mark Pitman <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-clear-soft.1000066400000000000000000000017151324217456300172770ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CLEAR\-SOFT" "1" "July 2016" "" "" . .SH "NAME" \fBgit\-clear\-soft\fR \- Soft clean up a repository . .SH "SYNOPSIS" \fBgit\-clear\-soft\fR . .SH "DESCRIPTION" Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD, however, preserving all changes that are located in files and directories listed in \.gitignore\. It is a git\-reset \-\-hard together with deletion of all untracked files that reside inside the working directory, excluding those in \.gitignore\. . .SH "EXAMPLES" Clears the repo\. . .IP "" 4 . .nf $ git clear\-soft . .fi . .IP "" 0 . .SH "AUTHOR" Modified version of script written by Daniel \'grindhold\' Brendle <\fIgrindhold@gmx\.net\fR> by Matiss Treinis <\fImrtreinis@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-clear-soft.html000066400000000000000000000112501324217456300200760ustar00rootroot00000000000000 git-clear-soft(1) - Soft clean up a repository
  1. git-clear-soft(1)
  2. git-clear-soft(1)

NAME

git-clear-soft - Soft clean up a repository

SYNOPSIS

git-clear-soft

DESCRIPTION

Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD, however, preserving all changes that are located in files and directories listed in .gitignore. It is a git-reset --hard together with deletion of all untracked files that reside inside the working directory, excluding those in .gitignore.

EXAMPLES

Clears the repo.

$ git clear-soft

AUTHOR

Modified version of script written by Daniel 'grindhold' Brendle <grindhold@gmx.net> by Matiss Treinis <mrtreinis@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2016
  2. git-clear-soft(1)
git-extras-4.5.0/man/git-clear-soft.md000066400000000000000000000014701324217456300175350ustar00rootroot00000000000000git-clear-soft(1) -- Soft clean up a repository ================================================ ## SYNOPSIS `git-clear-soft` ## DESCRIPTION Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD, however, preserving all changes that are located in files and directories listed in .gitignore. It is a git-reset --hard together with deletion of all untracked files that reside inside the working directory, excluding those in .gitignore. ## EXAMPLES Clears the repo. $ git clear-soft ## AUTHOR Modified version of script written by Daniel 'grindhold' Brendle <> by Matiss Treinis <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-clear.1000066400000000000000000000014311324217456300163210ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CLEAR" "1" "May 2016" "" "" . .SH "NAME" \fBgit\-clear\fR \- Rigorously clean up a repository . .SH "SYNOPSIS" \fBgit\-clear\fR . .SH "DESCRIPTION" Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD\. Basically it is a git\-reset \-\-hard together with deletion of all untracked files that reside inside the working directory, including those in \.gitignore\. . .SH "EXAMPLES" Clears the repo\. . .IP "" 4 . .nf $ git clear . .fi . .IP "" 0 . .SH "AUTHOR" Written by Daniel \'grindhold\' Brendle <\fIgrindhold@gmx\.net\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-clear.html000066400000000000000000000103261324217456300171300ustar00rootroot00000000000000 git-clear(1) - Rigorously clean up a repository
  1. git-clear(1)
  2. git-clear(1)

NAME

git-clear - Rigorously clean up a repository

SYNOPSIS

git-clear

DESCRIPTION

Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD. Basically it is a git-reset --hard together with deletion of all untracked files that reside inside the working directory, including those in .gitignore.

EXAMPLES

Clears the repo.

$ git clear

AUTHOR

Written by Daniel 'grindhold' Brendle <grindhold@gmx.net>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. May 2016
  2. git-clear(1)
git-extras-4.5.0/man/git-clear.md000066400000000000000000000012171324217456300165630ustar00rootroot00000000000000git-clear(1) -- Rigorously clean up a repository ================================================ ## SYNOPSIS `git-clear` ## DESCRIPTION Clears the repository to a state that it looks as if it was freshly cloned with the current HEAD. Basically it is a git-reset --hard together with deletion of all untracked files that reside inside the working directory, including those in .gitignore. ## EXAMPLES Clears the repo. $ git clear ## AUTHOR Written by Daniel 'grindhold' Brendle <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-commits-since.1000066400000000000000000000027511324217456300200130ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-COMMITS\-SINCE" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-commits\-since\fR \- Show commit logs since some date . .SH "SYNOPSIS" \fBgit\-commits\-since\fR [] . .SH "DESCRIPTION" List of commits since the given \fIdate\fR\. . .SH "OPTIONS" . .P Show commits more recent than \fIdate\fR\. By default, the command shows the commit logs since "last week"\. . .SH "EXAMPLES" It is really flexible and these are only 3 of the options, go ahead give it a try: . .IP "" 4 . .nf $ git commits\-since yesterday \.\.\. commits since yesterday nickl\- \- Merge branch upstream master\. nickl\- \- Rebase bolshakov with master TJ Holowaychuk \- Merge pull request #128 from nickl\-/git\-extras\-html\-hyperlinks TJ Holowaychuk \- Merge pull request #129 from nickl\-/develop nickl\- \- Fix #127 git\-ignore won\'t add duplicates\. $ git commits\-since 3 o clock pm \.\.\. commits since 3 o clock pm nickl\- \- Merge branch upstream master\. $ git commits\-since 2 hour ago \.\.\. commits since 2 hour ago nickl\- \- Merge branch upstream master\. TJ Holowaychuk \- Merge pull request #128 from nickl\-/git\-extras\-html\-hyperlinks TJ Holowaychuk \- Merge pull request #129 from nickl\-/develop . .fi . .IP "" 0 . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-commits-since.html000066400000000000000000000117541324217456300206220ustar00rootroot00000000000000 git-commits-since(1) - Show commit logs since some date
  1. git-commits-since(1)
  2. git-commits-since(1)

NAME

git-commits-since - Show commit logs since some date

SYNOPSIS

git-commits-since [<date>]

DESCRIPTION

List of commits since the given date.

OPTIONS

<date>

Show commits more recent than date. By default, the command shows the commit logs since "last week".

EXAMPLES

It is really flexible and these are only 3 of the options, go ahead give it a try:

$ git commits-since yesterday
... commits since yesterday
nickl- - Merge branch upstream master.
nickl- - Rebase bolshakov with master
TJ Holowaychuk - Merge pull request #128 from nickl-/git-extras-html-hyperlinks
TJ Holowaychuk - Merge pull request #129 from nickl-/develop
nickl- - Fix #127 git-ignore won't add duplicates.

$ git commits-since 3 o clock pm
... commits since 3 o clock pm
nickl- - Merge branch upstream master.

$ git commits-since 2 hour ago
... commits since 2 hour ago
nickl- - Merge branch upstream master.
TJ Holowaychuk - Merge pull request #128 from nickl-/git-extras-html-hyperlinks
TJ Holowaychuk - Merge pull request #129 from nickl-/develop

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-commits-since(1)
git-extras-4.5.0/man/git-commits-since.md000066400000000000000000000025471324217456300202560ustar00rootroot00000000000000git-commits-since(1) -- Show commit logs since some date ======================================================== ## SYNOPSIS `git-commits-since` [<date>] ## DESCRIPTION List of commits since the given _date_. ## OPTIONS <date> Show commits more recent than . By default, the command shows the commit logs since "last week". ## EXAMPLES It is really flexible and these are only 3 of the options, go ahead give it a try: $ git commits-since yesterday ... commits since yesterday nickl- - Merge branch upstream master. nickl- - Rebase bolshakov with master TJ Holowaychuk - Merge pull request #128 from nickl-/git-extras-html-hyperlinks TJ Holowaychuk - Merge pull request #129 from nickl-/develop nickl- - Fix #127 git-ignore won't add duplicates. $ git commits-since 3 o clock pm ... commits since 3 o clock pm nickl- - Merge branch upstream master. $ git commits-since 2 hour ago ... commits since 2 hour ago nickl- - Merge branch upstream master. TJ Holowaychuk - Merge pull request #128 from nickl-/git-extras-html-hyperlinks TJ Holowaychuk - Merge pull request #129 from nickl-/develop ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-contrib.1000066400000000000000000000022411324217456300166730ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CONTRIB" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-contrib\fR \- Show user\'s contributions . .SH "SYNOPSIS" \fBgit\-contrib\fR [|] . .SH "DESCRIPTION" Output a user\'s contributions to a project, based on the author name or email\. Returns multiple entries if there are more than one match\. . .SH "OPTIONS" . .P The name or email of the user who owns the contributions\. . .SH "EXAMPLES" . .nf Searching with a username $ git contrib visionmedia visionmedia (18): Export STATUS_CODES Moved help msg to node\-repl Added multiple arg support for sys\.puts(), print(), etc\. Fix stack output on socket error \.\.\. Searching with a partial email $ git contrib tj@ visionmedia (18): Export STATUS_CODES Moved help msg to node\-repl Added multiple arg support for sys\.puts(), print(), etc\. Fix stack output on socket error \.\.\. . .fi . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-contrib.html000066400000000000000000000112711324217456300175020ustar00rootroot00000000000000 git-contrib(1) - Show user's contributions
  1. git-contrib(1)
  2. git-contrib(1)

NAME

git-contrib - Show user's contributions

SYNOPSIS

git-contrib [<username>|<email>]

DESCRIPTION

Output a user's contributions to a project, based on the author name or email. Returns multiple entries if there are more than one match.

OPTIONS

<username>

The name or email of the user who owns the contributions.

EXAMPLES

Searching with a username

$ git contrib visionmedia
visionmedia (18):
  Export STATUS_CODES
  Moved help msg to node-repl
  Added multiple arg support for sys.puts(), print(), etc.
  Fix stack output on socket error
  ...

Searching with a partial email

$ git contrib tj@
visionmedia (18):
  Export STATUS_CODES
  Moved help msg to node-repl
  Added multiple arg support for sys.puts(), print(), etc.
  Fix stack output on socket error
  ...

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-contrib(1)
git-extras-4.5.0/man/git-contrib.md000066400000000000000000000021361324217456300171360ustar00rootroot00000000000000git-contrib(1) -- Show user's contributions =========================================== ## SYNOPSIS `git-contrib` [<username>|<email>] ## DESCRIPTION Output a user's contributions to a project, based on the author name or email. Returns multiple entries if there are more than one match. ## OPTIONS <username> The name or email of the user who owns the contributions. ## EXAMPLES Searching with a username $ git contrib visionmedia visionmedia (18): Export STATUS_CODES Moved help msg to node-repl Added multiple arg support for sys.puts(), print(), etc. Fix stack output on socket error ... Searching with a partial email $ git contrib tj@ visionmedia (18): Export STATUS_CODES Moved help msg to node-repl Added multiple arg support for sys.puts(), print(), etc. Fix stack output on socket error ... ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-count.1000066400000000000000000000020531324217456300163640ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-COUNT" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-count\fR \- Show commit count . .SH "SYNOPSIS" \fBgit\-count\fR [\-\-all] . .SH "DESCRIPTION" Show commit count\. . .SH "OPTIONS" \-\-all . .P Show commit count details\. . .SH "EXAMPLES" Output commit total: . .IP "" 4 . .nf $ git count total 1844 . .fi . .IP "" 0 . .P Output verbose commit count details: . .IP "" 4 . .nf $ 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 . .fi . .IP "" 0 . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-count.html000066400000000000000000000110241324217456300171660ustar00rootroot00000000000000 git-count(1) - Show commit count
  1. git-count(1)
  2. git-count(1)

NAME

git-count - Show commit count

SYNOPSIS

git-count [--all]

DESCRIPTION

Show commit count.

OPTIONS

--all

Show commit count details.

EXAMPLES

Output commit total:

$ git count

total 1844

Output verbose commit count details:

$ 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

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-count(1)
git-extras-4.5.0/man/git-count.md000066400000000000000000000015731324217456300166320ustar00rootroot00000000000000git-count(1) -- Show commit count ================================= ## SYNOPSIS `git-count` [--all] ## DESCRIPTION Show commit count. ## OPTIONS --all Show commit count details. ## EXAMPLES Output commit total: $ git count total 1844 Output verbose commit count details: $ 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 ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-create-branch.1000066400000000000000000000023241324217456300177330ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-CREATE\-BRANCH" "1" "July 2017" "" "" . .SH "NAME" \fBgit\-create\-branch\fR \- Create branches . .SH "SYNOPSIS" \fBgit\-create\-branch\fR [\-r|\-\-remote [remote_name]] . .SH "DESCRIPTION" Creates local branch named and optionally sets up a remote tracking branch\. . .SH "OPTIONS" <\-r|\-\-remote [remote_name]> . .P Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\. . .P . .P The name of the branch to create\. . .SH "EXAMPLES" . .nf $ git create\-branch integration $ git create\-branch \-r integration $ git create\-branch \-r upstream integration . .fi . .SH "NOTES" As of 4\.4\.0, the default behavior has changed\. \fBgit\-create\-branch\fR will no longer automatically setup a remote tracking branch unless the \fB\-r|\-remote\fR option is specified\. . .SH "AUTHOR" Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR> . .br Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-create-branch.html000066400000000000000000000122341324217456300205400ustar00rootroot00000000000000 git-create-branch(1) - Create branches
  1. git-create-branch(1)
  2. git-create-branch(1)

NAME

git-create-branch - Create branches

SYNOPSIS

git-create-branch [-r|--remote [remote_name]] <branchname>

DESCRIPTION

Creates local branch named <branchname> and optionally sets up a remote tracking branch.

OPTIONS

<-r|--remote [remote_name]>

Setup a remote tracking branch using remote_name. If remote_name is not supplied, use origin by default.

<branchname>

The name of the branch to create.

EXAMPLES

$ git create-branch integration

$ git create-branch -r integration

$ git create-branch -r upstream integration

NOTES

As of 4.4.0, the default behavior has changed. git-create-branch will no longer automatically setup a remote tracking branch unless the -r|-remote option is specified.

AUTHOR

Written by Jonhnny Weslley <jw@jonhnnyweslley.net>
Modified by Mark Pitman <mark.pitman@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2017
  2. git-create-branch(1)
git-extras-4.5.0/man/git-create-branch.md000066400000000000000000000020621324217456300201720ustar00rootroot00000000000000git-create-branch(1) -- Create branches ======================================= ## SYNOPSIS `git-create-branch` [-r|--remote [remote_name]] <branchname> ## DESCRIPTION Creates local branch named <branchname> and optionally sets up a remote tracking branch. ## OPTIONS <-r|--remote [remote_name]> Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. <branchname> The name of the branch to create. ## EXAMPLES $ git create-branch integration $ git create-branch -r integration $ git create-branch -r upstream integration ## NOTES As of 4.4.0, the default behavior has changed. `git-create-branch` will no longer automatically setup a remote tracking branch unless the `-r|-remote` option is specified. ## AUTHOR Written by Jonhnny Weslley <> Modified by Mark Pitman <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-delete-branch.1000066400000000000000000000014711324217456300177340ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-DELETE\-BRANCH" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-delete\-branch\fR \- Delete branches . .SH "SYNOPSIS" \fBgit\-delete\-branch\fR . .SH "DESCRIPTION" Deletes local and remote branch named \. Note that local deletion fails if the branch is checked out\. . .SH "OPTIONS" . .P The name of the branch to delete\. If multiple branches are provided, then they will all be deleted\. . .SH "EXAMPLES" . .nf $ git delete\-branch integration $ git delete\-branch integration bug/1234 . .fi . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-delete-branch.html000066400000000000000000000105371324217456300205430ustar00rootroot00000000000000 git-delete-branch(1) - Delete branches
  1. git-delete-branch(1)
  2. git-delete-branch(1)

NAME

git-delete-branch - Delete branches

SYNOPSIS

git-delete-branch <branchname>

DESCRIPTION

Deletes local and remote branch named <branchname>. Note that local deletion fails if the branch is checked out.

OPTIONS

<branchname>

The name of the branch to delete. If multiple branches are provided, then they will all be deleted.

EXAMPLES

$ git delete-branch integration
$ git delete-branch integration bug/1234

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-delete-branch(1)
git-extras-4.5.0/man/git-delete-branch.md000066400000000000000000000012751324217456300201760ustar00rootroot00000000000000git-delete-branch(1) -- Delete branches ======================================= ## SYNOPSIS `git-delete-branch` <branchname> ## DESCRIPTION Deletes local and remote branch named <branchname>. Note that local deletion fails if the branch is checked out. ## OPTIONS <branchname> The name of the branch to delete. If multiple branches are provided, then they will all be deleted. ## EXAMPLES $ git delete-branch integration $ git delete-branch integration bug/1234 ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-delete-merged-branches.1000066400000000000000000000012701324217456300215220ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-DELETE\-MERGED\-BRANCHES" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-delete\-merged\-branches\fR \- Delete merged branches . .SH "SYNOPSIS" \fBgit\-delete\-merged\-branches\fR . .SH "DESCRIPTION" Deletes all branches merged in to current HEAD\. Does not delete \fImaster\fR, even if run from a branch that is a descendant of \fImaster\fR\. . .SH "EXAMPLES" . .nf $ git delete\-merged\-branches . .fi . .SH "AUTHOR" Written by Jesús Espino <\fIjespinog@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-delete-merged-branches.html000066400000000000000000000102641324217456300223310ustar00rootroot00000000000000 git-delete-merged-branches(1) - Delete merged branches
  1. git-delete-merged-branches(1)
  2. git-delete-merged-branches(1)

NAME

git-delete-merged-branches - Delete merged branches

SYNOPSIS

git-delete-merged-branches

DESCRIPTION

Deletes all branches merged in to current HEAD. Does not delete master, even if run from a branch that is a descendant of master.

EXAMPLES

$ git delete-merged-branches

AUTHOR

Written by Jesús Espino <jespinog@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-delete-merged-branches(1)
git-extras-4.5.0/man/git-delete-merged-branches.md000066400000000000000000000010441324217456300217610ustar00rootroot00000000000000git-delete-merged-branches(1) -- Delete merged branches ===================================================== ## SYNOPSIS `git-delete-merged-branches` ## DESCRIPTION Deletes all branches merged in to current HEAD. Does not delete *master*, even if run from a branch that is a descendant of *master*. ## EXAMPLES $ git delete-merged-branches ## AUTHOR Written by Jesús Espino <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-delete-submodule.1000066400000000000000000000011351324217456300204730ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-DELETE\-SUBMODULE" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-delete\-submodule\fR \- Delete submodules . .SH "SYNOPSIS" \fBgit\-delete\-submodule\fR . .SH "DESCRIPTION" . .SH "OPTIONS" . .P The path of the submodule to delete\. . .SH "EXAMPLES" . .nf $ git delete\-submodule lib/foo . .fi . .SH "AUTHOR" Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-delete-submodule.html000066400000000000000000000102431324217456300212770ustar00rootroot00000000000000 git-delete-submodule(1) - Delete submodules
  1. git-delete-submodule(1)
  2. git-delete-submodule(1)

NAME

git-delete-submodule - Delete submodules

SYNOPSIS

git-delete-submodule <path>

DESCRIPTION

OPTIONS

<path>

The path of the submodule to delete.

EXAMPLES

$ git delete-submodule lib/foo

AUTHOR

Written by Jonhnny Weslley <jw@jonhnnyweslley.net>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-delete-submodule(1)
git-extras-4.5.0/man/git-delete-submodule.md000066400000000000000000000007271324217456300207410ustar00rootroot00000000000000git-delete-submodule(1) -- Delete submodules ============================================ ## SYNOPSIS `git-delete-submodule` <path> ## DESCRIPTION ## OPTIONS <path> The path of the submodule to delete. ## EXAMPLES $ git delete-submodule lib/foo ## AUTHOR Written by Jonhnny Weslley <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-delete-tag.1000066400000000000000000000013141324217456300172460ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-DELETE\-TAG" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-delete\-tag\fR \- Delete tags . .SH "SYNOPSIS" \fBgit\-delete\-tag\fR . .SH "DESCRIPTION" Deletes local and remote tag named \. . .SH "OPTIONS" . .P The name of the tag to delete\. If multiple tags are provided, then they will all be deleted\. . .SH "EXAMPLES" . .nf $ git delete\-tag 0\.0\.1 $ git delete\-tag 0\.0\.1 0\.0\.2 . .fi . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-delete-tag.html000066400000000000000000000103371324217456300200570ustar00rootroot00000000000000 git-delete-tag(1) - Delete tags
  1. git-delete-tag(1)
  2. git-delete-tag(1)

NAME

git-delete-tag - Delete tags

SYNOPSIS

git-delete-tag <tagname>

DESCRIPTION

Deletes local and remote tag named <tagname>.

OPTIONS

<tagname>

The name of the tag to delete. If multiple tags are provided, then they will all be deleted.

EXAMPLES

$ git delete-tag 0.0.1
$ git delete-tag 0.0.1 0.0.2

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-delete-tag(1)
git-extras-4.5.0/man/git-delete-tag.md000066400000000000000000000011051324217456300175040ustar00rootroot00000000000000git-delete-tag(1) -- Delete tags ================================ ## SYNOPSIS `git-delete-tag` <tagname> ## DESCRIPTION Deletes local and remote tag named <tagname>. ## OPTIONS <tagname> The name of the tag to delete. If multiple tags are provided, then they will all be deleted. ## EXAMPLES $ git delete-tag 0.0.1 $ git delete-tag 0.0.1 0.0.2 ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-delta.1000066400000000000000000000015061324217456300163270ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-DELTA" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-delta\fR \- Lists changed files . .SH "SYNOPSIS" \fBgit\-delta\fR [] [] . .SH "DESCRIPTION" Lists all files that differ from a branch\. By default, lists files that have been added, copied, or modified as compared to the \fBmaster\fR branch\. . .SH "EXAMPLES" Lists all modified and renamed files vs\. \fBmaster\fR: . .IP "" 4 . .nf $ git delta master MR . .fi . .IP "" 0 . .P Lists all deleted files vs\. \fBexample\fR: . .IP "" 4 . .nf $ git delta example D . .fi . .IP "" 0 . .SH "AUTHOR" Written by Ivan Malopinsky <\fIhello@imsky\.co\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-delta.html000066400000000000000000000103531324217456300171330ustar00rootroot00000000000000 git-delta(1) - Lists changed files
  1. git-delta(1)
  2. git-delta(1)

NAME

git-delta - Lists changed files

SYNOPSIS

git-delta [<branch>] [<filter>]

DESCRIPTION

Lists all files that differ from a branch. By default, lists files that have been added, copied, or modified as compared to the master branch.

EXAMPLES

Lists all modified and renamed files vs. master:

$ git delta master MR

Lists all deleted files vs. example:

$ git delta example D

AUTHOR

Written by Ivan Malopinsky <hello@imsky.co>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-delta(1)
git-extras-4.5.0/man/git-delta.md000066400000000000000000000012101324217456300165570ustar00rootroot00000000000000git-delta(1) -- Lists changed files =================================== ## SYNOPSIS `git-delta` [<branch>] [<filter>] ## DESCRIPTION Lists all files that differ from a branch. By default, lists files that have been added, copied, or modified as compared to the `master` branch. ## EXAMPLES Lists all modified and renamed files vs. `master`: $ git delta master MR Lists all deleted files vs. `example`: $ git delta example D ## AUTHOR Written by Ivan Malopinsky <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-effort.1000066400000000000000000000071711324217456300165270ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-EFFORT" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-effort\fR \- Show effort statistics on file(s) . .SH "SYNOPSIS" \fBgit\-effort\fR [\-\-above ] [\.\.\.] [\-\- [\.\.\.]] . .SH "DESCRIPTION" Shows effort statistics about files in the repository\. . .P Display includes: . .br \- Commits: number of commits per file \- highlighting files with most activity\. . .br \- Active days: total number of days which contributed modifications to this file\. . .SH "OPTIONS" \-\-above . .P Ignore files with commits <= a value\. . .P \.\.\. . .P Only count commits that touches the given paths\. . .P Note: \fBgit\-effort\fR does not accept revision ranges, but the underlying \fBgit log\fR does (See the examples)\. . .P \.\.\. . .P Options for \fBgit log\fR\. Note that you must use \fB\-\-\fR to separate options to \fBgit log\fR from options to \fBgit effort\fR\. This makes it possible to only count commits you are interested in\. Not all options are relevant in the context of \fBgit\-effort\fR, but those that are is listed under the "Commit Limiting" section on the \fBgit\-log\fR manpages\. . .SH "EXAMPLES" Note: Output will first appear unsorted, then the screen is cleared and the sorted list is output\. The initial unsorted list is not shown in the examples for brevity\. . .P Displays "effort" statistics: . .IP "" 4 . .nf $ git effort \-\-above 5 file commits active days git\-extras 26 18 git\-release 13 13 git\-effort 13 2 git\-ignore 11 7 git\-changelog 11 8 git\-graft 9 6 git\-summary 8 6 git\-delete\-branch 8 6 git\-repl 7 5 $ git effort \-\-above 5 bin/* \-\- \-\-after="one year ago" \-\-author="Leila Muhtasib" file commits active days git\-extras 15 12 git\-release 6 4 git\-effort 6 2 git\-ignore 4 4 git\-changelog 3 2 git\-graft 2 2 . .fi . .IP "" 0 . .P Showing statistics on directories is also possible: . .IP "" 4 . .nf $ git effort bin man \-\- \-\-after="one year ago" file commits active days bin\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. 406 232 man\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. 118 80 . .fi . .IP "" 0 . .P Only count commits in the specified revision range: . .P $ git effort \-\- master\.\.feature . .IP "" 4 . .nf file commits active days bin/git\-effort\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. 3 2 man/git\-effort\.md\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. 1 1 . .fi . .IP "" 0 . .SH "AUTHOR" Written by Leila Muhtasib <\fImuhtasib@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-effort.html000066400000000000000000000160641324217456300173340ustar00rootroot00000000000000 git-effort(1) - Show effort statistics on file(s)
  1. git-effort(1)
  2. git-effort(1)

NAME

git-effort - Show effort statistics on file(s)

SYNOPSIS

git-effort [--above <value>] [<path>...] [-- [<log options>...]]

DESCRIPTION

Shows effort statistics about files in the repository.

Display includes:
- Commits: number of commits per file - highlighting files with most activity.
- Active days: total number of days which contributed modifications to this file.

OPTIONS

--above <value>

Ignore files with commits <= a value.

<path>...

Only count commits that touches the given paths.

Note: git-effort does not accept revision ranges, but the underlying git log does (See the examples).

<log options>...

Options for git log. Note that you must use -- to separate options to git log from options to git effort. This makes it possible to only count commits you are interested in. Not all options are relevant in the context of git-effort, but those that are is listed under the "Commit Limiting" section on the git-log manpages.

EXAMPLES

Note: Output will first appear unsorted, then the screen is cleared and the sorted list is output. The initial unsorted list is not shown in the examples for brevity.

Displays "effort" statistics:

$ git effort --above 5

  file                                          commits    active days

  git-extras                                    26         18
  git-release                                   13         13
  git-effort                                    13         2
  git-ignore                                    11         7
  git-changelog                                 11         8
  git-graft                                     9          6
  git-summary                                   8          6
  git-delete-branch                             8          6
  git-repl                                      7          5


$ git effort --above 5 bin/* -- --after="one year ago" --author="Leila Muhtasib"

  file                                          commits    active days

  git-extras                                    15         12
  git-release                                   6          4
  git-effort                                    6          2
  git-ignore                                    4          4
  git-changelog                                 3          2
  git-graft                                     2          2

Showing statistics on directories is also possible:

$ git effort bin man -- --after="one year ago"

  file                                          commits    active days

  bin.......................................... 406        232
  man.......................................... 118        80

Only count commits in the specified revision range:

$ git effort -- master..feature

  file                                          commits    active days

  bin/git-effort............................... 3          2
  man/git-effort.md............................ 1          1

AUTHOR

Written by Leila Muhtasib <muhtasib@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-effort(1)
git-extras-4.5.0/man/git-effort.md000066400000000000000000000064341324217456300167700ustar00rootroot00000000000000git-effort(1) -- Show effort statistics on file(s) ================================= ## SYNOPSIS `git-effort` [--above <value>] [<path>...] [-- [<log options>...]] ## DESCRIPTION Shows effort statistics about files in the repository. Display includes: - Commits: number of commits per file - highlighting files with most activity. - Active days: total number of days which contributed modifications to this file. ## OPTIONS --above <value> Ignore files with commits <= a value. <path>... Only count commits that touches the given paths. Note: `git-effort` does not accept revision ranges, but the underlying `git log` does (See the examples). <log options>... Options for `git log`. Note that you must use `--` to separate options to `git log` from options to `git effort`. This makes it possible to only count commits you are interested in. Not all options are relevant in the context of `git-effort`, but those that are is listed under the "Commit Limiting" section on the `git-log` manpages. ## EXAMPLES Note: Output will first appear unsorted, then the screen is cleared and the sorted list is output. The initial unsorted list is not shown in the examples for brevity. Displays "effort" statistics: $ git effort --above 5 file commits active days git-extras 26 18 git-release 13 13 git-effort 13 2 git-ignore 11 7 git-changelog 11 8 git-graft 9 6 git-summary 8 6 git-delete-branch 8 6 git-repl 7 5 $ git effort --above 5 bin/* -- --after="one year ago" --author="Leila Muhtasib" file commits active days git-extras 15 12 git-release 6 4 git-effort 6 2 git-ignore 4 4 git-changelog 3 2 git-graft 2 2 Showing statistics on directories is also possible: $ git effort bin man -- --after="one year ago" file commits active days bin.......................................... 406 232 man.......................................... 118 80 Only count commits in the specified revision range: $ git effort -- master..feature file commits active days bin/git-effort............................... 3 2 man/git-effort.md............................ 1 1 ## AUTHOR Written by Leila Muhtasib <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-extras.1000066400000000000000000000120021324217456300165350ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-EXTRAS" "1" "February 2018" "" "" . .SH "NAME" \fBgit\-extras\fR \- Awesome GIT utilities . .SH "SYNOPSIS" \fBgit\-extras\fR [\-v,\-\-version] [\-h,\-\-help] [update] . .SH "OPTIONS" \-v, \-\-version . .P Show git\-extras version number\. . .P \-h, \-\-help . .P Show this help\. This option can also be used for any of the extras commands\. . .P update . .P Self update\. . .SH "COMMANDS" . .IP "\(bu" 4 \fBgit\-alias(1)\fR Define, search and show aliases . .IP "\(bu" 4 \fBgit\-archive\-file(1)\fR Export the current HEAD of the git repository to an archive . .IP "\(bu" 4 \fBgit\-authors(1)\fR Generate authors report . .IP "\(bu" 4 \fBgit\-back(1)\fR Undo and Stage latest commits . .IP "\(bu" 4 \fBgit\-bug(1)\fR Create bug branch . .IP "\(bu" 4 \fBgit\-bulk(1)\fR Run git commands on multiple repositories . .IP "\(bu" 4 \fBgit\-changelog(1)\fR Generate a changelog report . .IP "\(bu" 4 \fBgit\-chore(1)\fR Create chore branch . .IP "\(bu" 4 \fBgit\-clear(1)\fR Rigorously clean up a repository . .IP "\(bu" 4 \fBgit\-clear\-soft(1)\fR Soft clean up a repository . .IP "\(bu" 4 \fBgit\-commits\-since(1)\fR Show commit logs since some date . .IP "\(bu" 4 \fBgit\-contrib(1)\fR Show user\'s contributions . .IP "\(bu" 4 \fBgit\-count(1)\fR Show commit count . .IP "\(bu" 4 \fBgit\-create\-branch(1)\fR Create branches . .IP "\(bu" 4 \fBgit\-delete\-branch(1)\fR Delete branches . .IP "\(bu" 4 \fBgit\-delete\-merged\-branches(1)\fR Delete merged branches . .IP "\(bu" 4 \fBgit\-delete\-submodule(1)\fR Delete submodules . .IP "\(bu" 4 \fBgit\-delete\-tag(1)\fR Delete tags . .IP "\(bu" 4 \fBgit\-delta(1)\fR Lists changed files . .IP "\(bu" 4 \fBgit\-effort(1)\fR Show effort statistics on file(s) . .IP "\(bu" 4 \fBgit\-feature(1)\fR Create/Merge feature branch . .IP "\(bu" 4 \fBgit\-force\-clone(1)\fR overwrite local repositories with clone . .IP "\(bu" 4 \fBgit\-fork(1)\fR Fork a repo on github . .IP "\(bu" 4 \fBgit\-fresh\-branch(1)\fR Create fresh branches . .IP "\(bu" 4 \fBgit\-gh\-pages(1)\fR Create the GitHub Pages branch . .IP "\(bu" 4 \fBgit\-graft(1)\fR Merge and destroy a given branch . .IP "\(bu" 4 \fBgit\-guilt(1)\fR calculate change between two revisions . .IP "\(bu" 4 \fBgit\-ignore\-io(1)\fR Get sample gitignore file . .IP "\(bu" 4 \fBgit\-ignore(1)\fR Add \.gitignore patterns . .IP "\(bu" 4 \fBgit\-info(1)\fR Returns information on current repository . .IP "\(bu" 4 \fBgit\-line\-summary(1)\fR Show repository summary by line . .IP "\(bu" 4 \fBgit\-local\-commits(1)\fR List local commits . .IP "\(bu" 4 \fBgit\-locked(1)\fR ls files that have been locked . .IP "\(bu" 4 \fBgit\-lock(1)\fR Lock a file excluded from version control . .IP "\(bu" 4 \fBgit\-merge\-into(1)\fR Merge one branch into another . .IP "\(bu" 4 \fBgit\-merge\-repo(1)\fR Merge two repo histories . .IP "\(bu" 4 \fBgit\-missing(1)\fR Show commits missing from another branch . .IP "\(bu" 4 \fBgit\-mr(1)\fR Checks out a merge request locally . .IP "\(bu" 4 \fBgit\-obliterate(1)\fR rewrite past commits to remove some files . .IP "\(bu" 4 \fBgit\-pr(1)\fR Checks out a pull request locally . .IP "\(bu" 4 \fBgit\-psykorebase(1)\fR Rebase a branch with a merge commit . .IP "\(bu" 4 \fBgit\-pull\-request(1)\fR Create pull request for GitHub project . .IP "\(bu" 4 \fBgit\-reauthor(1)\fR Rewrite history to change author\'s identity . .IP "\(bu" 4 \fBgit\-rebase\-patch(1)\fR Rebases a patch . .IP "\(bu" 4 \fBgit\-refactor(1)\fR Create refactor branch . .IP "\(bu" 4 \fBgit\-release(1)\fR Commit, tag and push changes to the repository . .IP "\(bu" 4 \fBgit\-rename\-branch(1)\fR rename local branch and push to remote . .IP "\(bu" 4 \fBgit\-rename\-tag(1)\fR Rename a tag . .IP "\(bu" 4 \fBgit\-repl(1)\fR git read\-eval\-print\-loop . .IP "\(bu" 4 \fBgit\-reset\-file(1)\fR Reset one file . .IP "\(bu" 4 \fBgit\-root(1)\fR show path of root . .IP "\(bu" 4 \fBgit\-scp(1)\fR Copy files to SSH compatible \fBgit\-remote\fR . .IP "\(bu" 4 \fBgit\-sed(1)\fR replace patterns in git\-controlled files . .IP "\(bu" 4 \fBgit\-setup(1)\fR Set up a git repository . .IP "\(bu" 4 \fBgit\-show\-merged\-branches(1)\fR Show merged branches . .IP "\(bu" 4 \fBgit\-show\-tree(1)\fR show branch tree of commit history . .IP "\(bu" 4 \fBgit\-show\-unmerged\-branches(1)\fR Show unmerged branches . .IP "\(bu" 4 \fBgit\-squash(1)\fR Import changes from a branch . .IP "\(bu" 4 \fBgit\-stamp(1)\fR Stamp the last commit message . .IP "\(bu" 4 \fBgit\-standup(1)\fR Recall the commit history . .IP "\(bu" 4 \fBgit\-summary(1)\fR Show repository summary . .IP "\(bu" 4 \fBgit\-sync(1)\fR Sync local branch with remote branch . .IP "\(bu" 4 \fBgit\-touch(1)\fR Touch and add file to the index . .IP "\(bu" 4 \fBgit\-undo(1)\fR Remove latest commits . .IP "\(bu" 4 \fBgit\-unlock(1)\fR Unlock a file excluded from version control . .IP "" 0 . .SH "AUTHOR" Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-extras.html000066400000000000000000000323601324217456300173520ustar00rootroot00000000000000 git-extras(1) - Awesome GIT utilities
  1. git-extras(1)
  2. git-extras(1)

NAME

git-extras - Awesome GIT utilities

SYNOPSIS

git-extras [-v,--version] [-h,--help] [update]

OPTIONS

-v, --version

Show git-extras version number.

-h, --help

Show this help. This option can also be used for any of the extras commands.

update

Self update.

COMMANDS

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. February 2018
  2. git-extras(1)
git-extras-4.5.0/man/git-extras.md000066400000000000000000000077501324217456300170130ustar00rootroot00000000000000git-extras(1) -- Awesome GIT utilities ================================= ## SYNOPSIS `git-extras` [-v,--version] [-h,--help] [update] ## OPTIONS -v, --version Show git-extras version number. -h, --help Show this help. This option can also be used for any of the extras commands. update Self update. ## COMMANDS - **git-alias(1)** Define, search and show aliases - **git-archive-file(1)** Export the current HEAD of the git repository to an archive - **git-authors(1)** Generate authors report - **git-back(1)** Undo and Stage latest commits - **git-bug(1)** Create bug branch - **git-bulk(1)** Run git commands on multiple repositories - **git-changelog(1)** Generate a changelog report - **git-chore(1)** Create chore branch - **git-clear(1)** Rigorously clean up a repository - **git-clear-soft(1)** Soft clean up a repository - **git-commits-since(1)** Show commit logs since some date - **git-contrib(1)** Show user's contributions - **git-count(1)** Show commit count - **git-create-branch(1)** Create branches - **git-delete-branch(1)** Delete branches - **git-delete-merged-branches(1)** Delete merged branches - **git-delete-submodule(1)** Delete submodules - **git-delete-tag(1)** Delete tags - **git-delta(1)** Lists changed files - **git-effort(1)** Show effort statistics on file(s) - **git-feature(1)** Create/Merge feature branch - **git-force-clone(1)** overwrite local repositories with clone - **git-fork(1)** Fork a repo on github - **git-fresh-branch(1)** Create fresh branches - **git-gh-pages(1)** Create the GitHub Pages branch - **git-graft(1)** Merge and destroy a given branch - **git-guilt(1)** calculate change between two revisions - **git-ignore-io(1)** Get sample gitignore file - **git-ignore(1)** Add .gitignore patterns - **git-info(1)** Returns information on current repository - **git-line-summary(1)** Show repository summary by line - **git-local-commits(1)** List local commits - **git-locked(1)** ls files that have been locked - **git-lock(1)** Lock a file excluded from version control - **git-merge-into(1)** Merge one branch into another - **git-merge-repo(1)** Merge two repo histories - **git-missing(1)** Show commits missing from another branch - **git-mr(1)** Checks out a merge request locally - **git-obliterate(1)** rewrite past commits to remove some files - **git-pr(1)** Checks out a pull request locally - **git-psykorebase(1)** Rebase a branch with a merge commit - **git-pull-request(1)** Create pull request for GitHub project - **git-reauthor(1)** Rewrite history to change author's identity - **git-rebase-patch(1)** Rebases a patch - **git-refactor(1)** Create refactor branch - **git-release(1)** Commit, tag and push changes to the repository - **git-rename-branch(1)** rename local branch and push to remote - **git-rename-tag(1)** Rename a tag - **git-repl(1)** git read-eval-print-loop - **git-reset-file(1)** Reset one file - **git-root(1)** show path of root - **git-scp(1)** Copy files to SSH compatible `git-remote` - **git-sed(1)** replace patterns in git-controlled files - **git-setup(1)** Set up a git repository - **git-show-merged-branches(1)** Show merged branches - **git-show-tree(1)** show branch tree of commit history - **git-show-unmerged-branches(1)** Show unmerged branches - **git-squash(1)** Import changes from a branch - **git-stamp(1)** Stamp the last commit message - **git-standup(1)** Recall the commit history - **git-summary(1)** Show repository summary - **git-sync(1)** Sync local branch with remote branch - **git-touch(1)** Touch and add file to the index - **git-undo(1)** Remove latest commits - **git-unlock(1)** Unlock a file excluded from version control ## AUTHOR Written by Tj Holowaychuk <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-feature.1000066400000000000000000000026201324217456300166670ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-FEATURE" "1" "July 2017" "" "" . .SH "NAME" \fBgit\-feature\fR \- Create/Merge feature branch . .SH "SYNOPSIS" \fBgit\-feature\fR [\-a|\-\-alias branch_prefix] [\-r|\-\-remote [remote_name]] [finish] . .SH "DESCRIPTION" Create/Merge the given feature branch . .SH "OPTIONS" <\-a|\-\-alias branch_prefix> . .P use \fBbranch_prefix\fR instead of \fBfeature\fR . .P <\-r|\-\-remote [remote_name]> . .P Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\. . .P . .P Merge and delete the feature branch\. . .P . .P The name of the feature branch\. . .SH "EXAMPLES" . .nf $ git feature dependencies \.\.\. $ (feature/dependencies) git commit \-m "Some changes" \.\.\. $ (feature/dependencies) git checkout master $ git feature finish dependencies $ git alias features "feature \-a features" $ git features dependencies $ (features/dependencies) \.\.\. $ (features/dependencies) git checkout master $ git features finish dependencies $ git feature dependencies \-r upstream . .fi . .SH "AUTHOR" Written by Jesús Espino <\fIjespinog@gmail\.com\fR> . .br Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-feature.html000066400000000000000000000124231324217456300174750ustar00rootroot00000000000000 git-feature(1) - Create/Merge feature branch
  1. git-feature(1)
  2. git-feature(1)

NAME

git-feature - Create/Merge feature branch

SYNOPSIS

git-feature [-a|--alias branch_prefix] [-r|--remote [remote_name]] [finish] <name>

DESCRIPTION

Create/Merge the given feature branch

OPTIONS

<-a|--alias branch_prefix>

use branch_prefix instead of feature

<-r|--remote [remote_name]>

Setup a remote tracking branch using remote_name. If remote_name is not supplied, use origin by default.

<finish>

Merge and delete the feature branch.

<name>

The name of the feature branch.

EXAMPLES

$ git feature dependencies
...
$ (feature/dependencies) git commit -m "Some changes"
...
$ (feature/dependencies) git checkout master
$ git feature finish dependencies

$ git alias features "feature -a features"
$ git features dependencies
$ (features/dependencies) ...
$ (features/dependencies) git checkout master
$ git features finish dependencies

$ git feature dependencies -r upstream

AUTHOR

Written by Jesús Espino <jespinog@gmail.com>
Modified by Mark Pitman <mark.pitman@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. July 2017
  2. git-feature(1)
git-extras-4.5.0/man/git-feature.md000066400000000000000000000024251324217456300171320ustar00rootroot00000000000000git-feature(1) -- Create/Merge feature branch ======================================= ## SYNOPSIS `git-feature` [-a|--alias branch_prefix] [-r|--remote [remote_name]] [finish] <name> ## DESCRIPTION Create/Merge the given feature branch ## OPTIONS <-a|--alias branch_prefix> use `branch_prefix` instead of `feature` <-r|--remote [remote_name]> Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. <finish> Merge and delete the feature branch. <name> The name of the feature branch. ## EXAMPLES $ git feature dependencies ... $ (feature/dependencies) git commit -m "Some changes" ... $ (feature/dependencies) git checkout master $ git feature finish dependencies $ git alias features "feature -a features" $ git features dependencies $ (features/dependencies) ... $ (features/dependencies) git checkout master $ git features finish dependencies $ git feature dependencies -r upstream ## AUTHOR Written by Jesús Espino <> Modified by Mark Pitman <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-force-clone.1000066400000000000000000000037211324217456300174330ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-FORCE\-CLONE" "1" "2016-10-29" "" "Git Extras" . .SH "NAME" \fBgit\-force\-clone\fR \- overwrite local repositories with clone . .SH "SYNOPSIS" \fBforce\-clone \-\-help\fR \fBforce\-clone {remote_url} {destination_path}\fR \fBforce\-clone \-\-branch {branch_name} {remote_url} {destination_path}\fR . .SH "DESCRIPTION" Provides the basic functionality of \fBgit clone\fR, but if the destination git repository already exists it will force\-reset it to resemble a clone of the remote\. . .P Because it doesn\'t actually delete the directory, it is usually significantly faster than the alternative of deleting the directory and cloning the repository from scratch\. . .P \fBCAUTION\fR: If the repository exists, this will destroy \fIall\fR local work: changed files will be reset, local branches and other remotes will be removed\. . .SH "PROCESS" If \fBtarget\-directory\fR doesn\'t exist or isn\'t a git repository then the arguments will simply be passed through to \fBgit clone\fR\. . .P If \fBtarget\-directory\fR exists and is a git repository then this will: . .IP "\(bu" 4 Remove all remotes . .IP "\(bu" 4 Set the origin remote to \fB{remote_url}\fR and fetch the remote . .IP "\(bu" 4 Discover the default branch, if no branch was specified . .IP "\(bu" 4 Check out the selected branch . .IP "\(bu" 4 Delete all other local branches . .IP "" 0 . .SH "OPTIONS" \fB{remote_url}\fR \- The URL for a git remote repository of which to make a clone\. \fB{destination_path}\fR \- A path to the local git repository location to clone into\. \fB\-\-branch {branch_name}\fR \- After cloning, checkout this branch\. . .SH "EXAMPLES" \fBgit\-force\-clone \-b master git@github\.com:me/repo\.git \./repo_dir\fR . .SH "AUTHOR" Written by Robin Winslow \fIrobin@robinwinslow\.co\.uk\fR\. . .SH "REPORTING BUGS" \fIhttps://github\.com/tj/git\-extras/issues\fR . .SH "SEE ALSO" \fIhttps://github\.com/tj/git\-extras\fR git-extras-4.5.0/man/git-force-clone.html000066400000000000000000000132001324217456300202300ustar00rootroot00000000000000 git-force-clone(1) - overwrite local repositories with clone
  1. git-force-clone(1)
  2. Git Extras
  3. git-force-clone(1)

NAME

git-force-clone - overwrite local repositories with clone

SYNOPSIS

force-clone --help force-clone {remote_url} {destination_path} force-clone --branch {branch_name} {remote_url} {destination_path}

DESCRIPTION

Provides the basic functionality of git clone, but if the destination git repository already exists it will force-reset it to resemble a clone of the remote.

Because it doesn't actually delete the directory, it is usually significantly faster than the alternative of deleting the directory and cloning the repository from scratch.

CAUTION: If the repository exists, this will destroy all local work: changed files will be reset, local branches and other remotes will be removed.

PROCESS

If target-directory doesn't exist or isn't a git repository then the arguments will simply be passed through to git clone.

If target-directory exists and is a git repository then this will:

  • Remove all remotes
  • Set the origin remote to {remote_url} and fetch the remote
  • Discover the default branch, if no branch was specified
  • Check out the selected branch
  • Delete all other local branches

OPTIONS

{remote_url} - The URL for a git remote repository of which to make a clone. {destination_path} - A path to the local git repository location to clone into. --branch {branch_name} - After cloning, checkout this branch.

EXAMPLES

git-force-clone -b master git@github.com:me/repo.git ./repo_dir

AUTHOR

Written by Robin Winslow robin@robinwinslow.co.uk.

REPORTING BUGS

https://github.com/tj/git-extras/issues

SEE ALSO

https://github.com/tj/git-extras

  1. 2016-10-29
  2. git-force-clone(1)
git-extras-4.5.0/man/git-force-clone.md000066400000000000000000000031431324217456300176710ustar00rootroot00000000000000git-force-clone(1) -- overwrite local repositories with clone === ## SYNOPSIS `force-clone --help` `force-clone {remote_url} {destination_path}` `force-clone --branch {branch_name} {remote_url} {destination_path}` ## DESCRIPTION Provides the basic functionality of `git clone`, but if the destination git repository already exists it will force-reset it to resemble a clone of the remote. Because it doesn't actually delete the directory, it is usually significantly faster than the alternative of deleting the directory and cloning the repository from scratch. **CAUTION**: If the repository exists, this will destroy *all* local work: changed files will be reset, local branches and other remotes will be removed. ## PROCESS If `target-directory` doesn't exist or isn't a git repository then the arguments will simply be passed through to `git clone`. If `target-directory` exists and is a git repository then this will: - Remove all remotes - Set the origin remote to `{remote_url}` and fetch the remote - Discover the default branch, if no branch was specified - Check out the selected branch - Delete all other local branches ## OPTIONS `{remote_url}` - The URL for a git remote repository of which to make a clone. `{destination_path}` - A path to the local git repository location to clone into. `--branch {branch_name}` - After cloning, checkout this branch. ## EXAMPLES `git-force-clone -b master git@github.com:me/repo.git ./repo_dir` ## AUTHOR Written by Robin Winslow . ## REPORTING BUGS ## SEE ALSO git-extras-4.5.0/man/git-fork.1000066400000000000000000000034271324217456300162030ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-FORK" "1" "August 2016" "" "Git Extras" . .SH "NAME" \fBgit\-fork\fR \- Fork a repo on github . .SH "SYNOPSIS" \fBgit\-fork\fR [] . .SH "DESCRIPTION" If a github repo url is given, fork the repo\. Like clone but forks first\. . .IP "1." 4 forks the repo on github . .IP "2." 4 clones the repo into the current dir . .IP "3." 4 adds the original repo as a remote called \fBupstream\fR . .IP "" 0 . .P If a url is not given and the current dir is a github repo, fork the repo\. . .IP "1." 4 forks the current repo . .IP "2." 4 rename the \fBorigin\fR remote repo to \fBupstream\fR . .IP "3." 4 adds the forked repo as a remote called \fBorigin\fR . .IP "" 0 . .P Remotes will use ssh if you have it configured with GitHub, if not, https will be used\. . .SH "EXAMPLE" Fork expect\.js: . .IP "" 4 . .nf $ git fork https://github\.com/LearnBoost/expect\.js . .fi . .IP "" 0 . .P or just: . .IP "" 4 . .nf $ git fork LearnBoost/expect\.js . .fi . .IP "" 0 . .P Then: . .IP "" 4 . .nf $ \.\.\.\.\. $ 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) . .fi . .IP "" 0 . .P If the current dir is a clone of expect\.js, this has the same effect: . .IP "" 4 . .nf $ git fork . .fi . .IP "" 0 . .SH "AUTHOR" Written by Andrew Griffiths <\fImail@andrewgriffithsonline\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-fork.html000066400000000000000000000125241324217456300170050ustar00rootroot00000000000000 git-fork(1) - Fork a repo on github
  1. git-fork(1)
  2. Git Extras
  3. git-fork(1)

NAME

git-fork - Fork a repo on github

SYNOPSIS

git-fork [<github-repo-url>]

DESCRIPTION

If a github repo url is given, fork the repo. Like clone but forks first.

  1. forks the repo on github
  2. clones the repo into the current dir
  3. adds the original repo as a remote called upstream

If a url is not given and the current dir is a github repo, fork the repo.

  1. forks the current repo
  2. rename the origin remote repo to upstream
  3. adds the forked repo as a remote called origin

Remotes will use ssh if you have it configured with GitHub, if not, https will be used.

EXAMPLE

Fork expect.js:

$ git fork https://github.com/LearnBoost/expect.js

or just:

$ git fork LearnBoost/expect.js

Then:

$ ..<forks into your github profile and clones repo locally to expect.js dir>...

$ cd expect.js && git remote -v

  origin          git@github.com:<user>/expect.js (fetch)
  origin          git@github.com:<user>/expect.js (push)
  upstream        git@github.com:LearnBoost/expect.js (fetch)
  upstream        git@github.com:LearnBoost/expect.js (push)

If the current dir is a clone of expect.js, this has the same effect:

$ git fork

AUTHOR

Written by Andrew Griffiths <mail@andrewgriffithsonline.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. August 2016
  2. git-fork(1)
git-extras-4.5.0/man/git-fork.md000066400000000000000000000027011324217456300164350ustar00rootroot00000000000000git-fork(1) -- Fork a repo on github ==================================== ## SYNOPSIS `git-fork` [<github-repo-url>] ## DESCRIPTION If a github repo url is given, fork the repo. Like clone but forks first. 1. forks the repo on github 2. clones the repo into the current dir 3. adds the original repo as a remote called `upstream` If a url is not given and the current dir is a github repo, fork the repo. 1. forks the current repo 2. rename the `origin` remote repo to `upstream` 3. adds the forked repo as a remote called `origin` Remotes will use ssh if you have it configured with GitHub, if not, https will be used. ## EXAMPLE Fork expect.js: $ git fork https://github.com/LearnBoost/expect.js or just: $ git fork LearnBoost/expect.js Then: $ ..... $ 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) If the current dir is a clone of expect.js, this has the same effect: $ git fork ## AUTHOR Written by Andrew Griffiths <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-fresh-branch.1000066400000000000000000000012031324217456300175720ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-FRESH\-BRANCH" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-fresh\-branch\fR \- Create fresh branches . .SH "SYNOPSIS" \fBgit\-fresh\-branch\fR . .SH "DESCRIPTION" Creates empty local branch named \. . .SH "OPTIONS" . .P The name of the branch to create\. . .SH "EXAMPLES" . .nf $ git fresh\-branch docs . .fi . .SH "AUTHOR" Written by Kenneth Reitz <\fIme@kennethreitz\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-fresh-branch.html000066400000000000000000000102711324217456300204030ustar00rootroot00000000000000 git-fresh-branch(1) - Create fresh branches
  1. git-fresh-branch(1)
  2. git-fresh-branch(1)

NAME

git-fresh-branch - Create fresh branches

SYNOPSIS

git-fresh-branch <branchname>

DESCRIPTION

Creates empty local branch named <branchname>.

OPTIONS

<branchname>

The name of the branch to create.

EXAMPLES

$ git fresh-branch docs

AUTHOR

Written by Kenneth Reitz <me@kennethreitz.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-fresh-branch(1)
git-extras-4.5.0/man/git-fresh-branch.md000066400000000000000000000010111324217456300200270ustar00rootroot00000000000000git-fresh-branch(1) -- Create fresh branches ============================================ ## SYNOPSIS `git-fresh-branch` <branchname> ## DESCRIPTION Creates empty local branch named <branchname>. ## OPTIONS <branchname> The name of the branch to create. ## EXAMPLES $ git fresh-branch docs ## AUTHOR Written by Kenneth Reitz <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-gh-pages.1000066400000000000000000000017731324217456300167370ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-GH\-PAGES" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-gh\-pages\fR \- Create the GitHub Pages branch . .SH "SYNOPSIS" \fBgit\-gh\-pages\fR . .SH "DESCRIPTION" Create the GitHub Pages branch (gh\-pages) with an initial dummy index\.html file\. . .SH "EXAMPLES" . .nf $ git gh\-pages setting up gh\-pages Removing \.\.\. [gh\-pages (root\-commit) 94f4b26] Initial commit 1 file changed, 1 insertion(+) create mode 100644 index\.html Counting objects: 3, done\. Writing objects: 100% (3/3), 232 bytes, done\. Total 3 (delta 0), reused 0 (delta 0) To git@github\.com:myuser/myrepository\.git * [new branch] gh\-pages \-> gh\-pages Branch gh\-pages set up to track remote branch gh\-pages from origin\. complete $ . .fi . .SH "AUTHOR" Written by Jesús Espino <\fIjespinog@gmail\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-gh-pages.html000066400000000000000000000107041324217456300175350ustar00rootroot00000000000000 git-gh-pages(1) - Create the GitHub Pages branch
  1. git-gh-pages(1)
  2. git-gh-pages(1)

NAME

git-gh-pages - Create the GitHub Pages branch

SYNOPSIS

git-gh-pages

DESCRIPTION

Create the GitHub Pages branch (gh-pages) with an initial dummy index.html file.

EXAMPLES

$ git gh-pages
setting up gh-pages
Removing ...
[gh-pages (root-commit) 94f4b26] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 index.html
Counting objects: 3, done.
Writing objects: 100% (3/3), 232 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:myuser/myrepository.git
 * [new branch]      gh-pages -> gh-pages
Branch gh-pages set up to track remote branch gh-pages from origin.
complete
$

AUTHOR

Written by Jesús Espino <jespinog@gmail.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-gh-pages(1)
git-extras-4.5.0/man/git-gh-pages.md000066400000000000000000000016361324217456300171750ustar00rootroot00000000000000git-gh-pages(1) -- Create the GitHub Pages branch ================================================= ## SYNOPSIS `git-gh-pages` ## DESCRIPTION Create the GitHub Pages branch (gh-pages) with an initial dummy index.html file. ## EXAMPLES $ git gh-pages setting up gh-pages Removing ... [gh-pages (root-commit) 94f4b26] Initial commit 1 file changed, 1 insertion(+) create mode 100644 index.html Counting objects: 3, done. Writing objects: 100% (3/3), 232 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To git@github.com:myuser/myrepository.git * [new branch] gh-pages -> gh-pages Branch gh-pages set up to track remote branch gh-pages from origin. complete $ ## AUTHOR Written by Jesús Espino <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-graft.1000066400000000000000000000011731324217456300163410ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-GRAFT" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-graft\fR \- Merge and destroy a given branch . .SH "SYNOPSIS" \fBgit\-graft\fR . .SH "DESCRIPTION" Merge commits from into . .SH "OPTIONS" . .P . .SH "EXAMPLES" . .nf $ git graft new_feature dev . .fi . .SH "AUTHOR" Written by Kenneth Reitz <\fIme@kennethreitz\.com\fR> . .SH "REPORTING BUGS" <\fIhttps://github\.com/tj/git\-extras/issues\fR> . .SH "SEE ALSO" <\fIhttps://github\.com/tj/git\-extras\fR> git-extras-4.5.0/man/git-graft.html000066400000000000000000000102711324217456300171440ustar00rootroot00000000000000 git-graft(1) - Merge and destroy a given branch
  1. git-graft(1)
  2. git-graft(1)

NAME

git-graft - Merge and destroy a given branch

SYNOPSIS

git-graft <src-branch> <dest-branch>

DESCRIPTION

Merge commits from <src-branch> into <dest-branch>

OPTIONS

<src-branch>

<dest-branch>

EXAMPLES

$ git graft new_feature dev

AUTHOR

Written by Kenneth Reitz <me@kennethreitz.com>

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

  1. December 2015
  2. git-graft(1)
git-extras-4.5.0/man/git-graft.md000066400000000000000000000010241324217456300165740ustar00rootroot00000000000000git-graft(1) -- Merge and destroy a given branch ====================================== ## SYNOPSIS `git-graft` <src-branch> <dest-branch> ## DESCRIPTION Merge commits from <src-branch> into <dest-branch> ## OPTIONS <src-branch> <dest-branch> ## EXAMPLES $ git graft new_feature dev ## AUTHOR Written by Kenneth Reitz <> ## REPORTING BUGS <> ## SEE ALSO <> git-extras-4.5.0/man/git-guilt.1000066400000000000000000000045031324217456300163620ustar00rootroot00000000000000.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "GIT\-GUILT" "1" "December 2015" "" "" . .SH "NAME" \fBgit\-guilt\fR \- calculate change between two revisions . .SH "SYNOPSIS" \fBgit guilt\fR [