{"id":16679776,"url":"https://github.com/buren/git-story","last_synced_at":"2025-10-28T06:08:32.360Z","repository":{"id":12593404,"uuid":"15264254","full_name":"buren/git-story","owner":"buren","description":"Simplified git workflow.","archived":false,"fork":false,"pushed_at":"2021-11-29T07:02:25.000Z","size":977,"stargazers_count":33,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T03:51:21.423Z","etag":null,"topics":["convenience-extensions","git-tool","shell"],"latest_commit_sha":null,"homepage":"http://jacobburenstam.com/git-story/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"powerman/vim-plugin-autosess","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-17T19:48:29.000Z","updated_at":"2023-09-13T10:32:58.000Z","dependencies_parsed_at":"2022-09-14T13:31:49.437Z","dependency_job_id":null,"html_url":"https://github.com/buren/git-story","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buren%2Fgit-story","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buren%2Fgit-story/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buren%2Fgit-story/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buren%2Fgit-story/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buren","download_url":"https://codeload.github.com/buren/git-story/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244848930,"owners_count":20520613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convenience-extensions","git-tool","shell"],"created_at":"2024-10-12T13:37:26.804Z","updated_at":"2025-10-28T06:08:32.259Z","avatar_url":"https://github.com/buren.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-story\n\nVarious extensions to git, documented below.\n\n\n* [Installation](#install-git-story)\n* [Getting Started](#getting-started)\n* [Example](#example)\n* [Configuration](#configuration)\n* [Documentation](#documentation)\n  * [Branching extensions](#branching-extensions)\n  * [Convenience extensions](#convenience-extensions)\n  * [Log extensions](#log-extensions)\n  * [Project integration extensions](#project-integration-extensions)\n  * [Statistics extensions](#statistics-extensions)\n  * [git-story interactions](#git-story-interactions)\n  * [Misc](#misc)\n* [Notes](#notes)\n* [License](#license)\n\n## Install git-story\n```bash\ncurl -L https://raw.githubusercontent.com/buren/git-story/master/setup/install | bash\n```\nThe above command will install and inject an import of the git-story script to either `.bash_profile`, `.bashrc` or `.zshrc` (in that order).  See [install script](https://github.com/buren/git-story/blob/master/setup/install) for details.\n\nReload your shell to initialize git-story extensions.\n\n## Getting started\n\n\nBranch model:\n\n1. Start developing a feature, and name it `git feature \u003cname\u003e`\n2. Save local changes and sync with remote `git finish`\n3. Create a pull request\n\nThe principle is that you develop each new feature in its own branch and when\nyou're done you push it and create a pull request. See [GitHub flow](http://scottchacon.com/2011/08/31/github-flow.html) branch model.\nNote that `git feature` and `git finish` are flexible. They both take an optional argument _target-branch_, which the current/new branch will sync with.\n\n## Example\n```bash\n$ git feature branch-name   # Sets up clean workspace based on remote master.\n$ git finish              # Commit changes, updates current and local branch.\n```\nOutput [example](http://showterm.io/ec6267151db96042b6cf8) (video).\n\n## Documentation\n\nPrint command usage:\n```bash\n$ git \u003cgit-story-extension\u003e --usage\n```\n### Branching extensions\n\n* Start developing a feature\n  ```bash\n  $ git feature \u003cbranch-name\u003e \u003ctarget-branch\u003e\n  ```\n  this will create a new branch _branch-name_ based of master or specified _target-branch_. If the branch exists on remote pull the latest changes. Ensures the uniqueness of branch name at remote. Pushes the created branch to remote.\n  Executes:\n  1. Checkout _target-branch_\n  2. Pull _target-branch_\n  3. Create new branch _branch-name_\n  4. Push _branch-name_\n\n* Commit and sync with repository\n  ```bash\n  $ git finish \u003ctarget-branch\u003e\n  ```\n  commit the changes you've made and merge changes with _target-branch_.\n  _target-branch_ is optional and the default is _target-branch_.\n  Executes:\n  1. Prompt commit message if any uncommitted changes\n  2. Pull current branch\n  3. Pull _target-branch_\n  4. Push current branch\n  5. Perform local merge with _target-branch_ if configured\nwill exit and print conflicted files if any merge conflicts are found.\n\n* `git branch-status` shows current branch status.\n* `git pull-branch` pull current, or specified, branch's remote changes.\n* `git create-branch` create and checkout a new branch and push to remote.\n* `git push-branch` push the current branch to remote.\n* `git delete-branch` delete branch from remote and local.\n* `git delete-merged` delete all merged branches locally and at remote.\n\n\n### Convenience extensions\n* `git addcom` add all files and commit.\n* `git fuckit` commit all files and push current branch. Default is to prompt for commit message.\n* `git redo-commit` redo last commit.\n* `git goto \u003cbranch-name\u003e` switches to branch _branch-name_ if the working directory is clean.\n* `git abort-merge` aborts current merge.\n* `git obliterate` remove file from local repository and its entire history.\n* `git zip-project` create zip-file of project.\n* `git ignore` add and list patterns to local and global gitignore.\n* `git ignore-boilerplate` easy access to gitignore boilerplates from github.com/github/gitignore.\n* `git conflicted` list files with merge-conflicts.\n* `git todos` list all TODOS and FIXMES.\n* `git tag-release` create a new tagged release.\n* `git rename-tag` rename an existing release.\n* `git changelog` print change log from last tag.\n* `git squash-commits` squash given number of commits together.\n\n### Log extensions\n* `git history` view repository commit history.\n* `git trail` shows the last common commit with current branch.\n* `git neck` show commits until first branching point.\n* `git divergence` show the difference between current branch and the same branch at remote.\n* `git local-commits` show local commits that haven't been pushed to remote.\n* `git commits-since` show commits since given time.\n\n### Project integration extensions\n* `git browse`  opens the repository on GitHub.\n* `git package` package project, runs `GS_PACKAGE`.\n* `git deploy` package project, runs `GS_DEPLOY`.\n* `git install-project` install project, runs `GS_INSTALL`.\n* `git test`    package project, runs `GS_PRE_COMMIT_HOOK`.\n* `git tag-release` tags release, runs `GS_TAG_RELEASE`.\n\n### Statistics extensions\n* Show statistics for repository\n\n        git stat \u003ctype\u003e\n\n        types:\n          contrib \u003cname\u003e # shows statistics for all or specified author (alias: contributions)\n          commits        # shows number of commits for each author\n          weekdays       # prints statistics for number of commits per weekday\n          hour           # prints statistics for number of commits per hour\n          files          # prints number of files and lines\n          diff           # Print stat of uncommitted changes\n          log            # Print log with stat\n          modified       # Print stat of most modified files\n\n  prints statistics of given type.\n* `git churn` count number of changes for each file.\n* `git effort` like churn, but prettier and with active day count.\n* `git summary` show summary for current project.\n\n### git-story interactions\n* `git gs-update` gets the latest version of git-story.\n* `git gs-extend \u003cextension-name\u003e` add new git-story extension to git.\n* `git gs` list git-story extensions.\n\n### Misc\n* `git repl` git read-eval-print-loop (REPL).\n\n\n## Configuration\nConfigure `git-story` by creating a file `~/.gitstoryrc`\nFor project specific configurations create a file named `.gitstoryrc` at the project's git root.\n\nSee full example with comments in [docs/gitstoryrc-example](https://github.com/buren/git-story/blob/master/docs/gitstoryrc-example).\n\nAvailable options and their [default](https://github.com/buren/git-story/blob/master/config) value:\n\n    GS_DEFAULT_REMOTE='origin'          # Default remote for git story\n    GS_GIT_STORY_BRANCH='master'        # Target branch for 'feature' \u0026 'finish'\n    GS_LOCAL_MERGE=false                # Perform local merge on 'finish'\n    GS_PRINT_CHECKLIST=false            # Print checklist before 'finish'\n    GS_GRAPHIC_PROMPT=false             # Show all prompts (on OSX) in a GUI dialog\n    GS_PROMPT_ON_DONE=false             # Prompt user before 'finish'\n    GS_TEST_ON_DONE=true                # Run test command before 'finish'\n    GS_SIGN_RELEASE=true                # Sign tags created with 'tag-release'\n    GS_SIGN_COMMITS=true                # Sign each commit created with addcom, with GPG-key\n    GS_SIGN_COMMITS_STRING=true         # Sign each commit created with addcom, with --signoff\n    GS_CHECKLIST_MESSAGE='...'          # Checklist string for 'finish'\n    GS_PRE_COMMIT_HOOK=''               # A command that runs all tests\n    GS_PACKAGE=''                       # Shell command for 'package'\n    GS_DEPLOY=''                        # Shell command for 'deploy'\n    GS_TAG_RELEASE=''                   # Shell command for 'tag-release'\n    GS_INTSALL=''                       # Shell command for 'install'\n    GS_HAS_GITHUB=true                  # Project has GitHub.\n    GS_PROJECT_URL=''                   # Project URL\n    GS_TEST_ON_AUTO_MERGE=true          # Run tests command on auto merge\n    GS_PRODUCTION_BRANCH='heads/master' # Integration branch for production\n    GS_NEXT_VERSION_BRANCH=''           # Integration branch for next\n    GS_EDGE_BRANCH=''                   # Integration branch for edge\n    GS_GIT_STORY_EXT_BRANCH='master'    # Target branch for git-story extension\n\n## Notes\n* The software is supplied “as is” and all use is at your own risk (see [license](https://github.com/buren/git-story/blob/master/LICENSE))\n* `git branch-status` requires Ruby 1.8.7 or greater\n* Tested on Linux/OSX/Windows using both zsh, bash and cygwin*, doesn't work with sh.\n* Almost everything works with cygwin except:\n  * `git trail`\n  * `git neck` both neck and trail fails on `git -p column`\n* Fork the repository and update the URL defined in [setup/install](https://github.com/buren/git-story/blob/master/setup/install#L2) to install and use your own version of git-story\n* Thanks:\n  * [visionmedia/git-extras](https://github.com/visionmedia/git-extras)\n  * [cypher/dotfiles](https://github.com/cypher/dotfiles)\n  * [simonwhitaker/gibo](https://github.com/simonwhitaker/gibo/)\n* Uninstall git-story: `rm -rf ~/.git-story`\n\n\n## License\ngit-story is released under the [MIT License](https://github.com/buren/git-story/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburen%2Fgit-story","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburen%2Fgit-story","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburen%2Fgit-story/lists"}