Originate/git-town
Generic, high-level Git workflow support!
repo name | Originate/git-town |
repo link | https://github.com/Originate/git-town |
homepage | http://www.git-town.com |
language | Gherkin |
size (curr.) | 30054 kB |
stars (curr.) | 1771 |
created | 2014-05-15 |
license | MIT License |
Git Town makes software development teams who use Git even more productive and happy. It adds Git commands that support GitHub Flow, Git Flow, the Nvie model, GitLab Flow, and other workflows more directly, and it allows you to perform many common Git operations faster and easier.
See git-town.com for documentation and this Softpedia article for an independent review.
Commands
Git Town provides these additional Git commands:
Development Workflow
- git town hack - cuts a new up-to-date feature branch off the main branch
- git town sync - updates the current branch with all ongoing changes
- git town new-pull-request - create a new pull request
- git town ship - delivers a completed feature branch and removes it
Repository Maintenance
- git town kill - removes a feature branch
- git town prune-branches - delete all merged branches
- git town rename-branch - rename a branch
- git town append - insert a new branch as a child of the current branch
- git town prepend - insert a new branch between the current branch and its parent
- git town repo - view the repository homepage
Git Town Configuration
- git town config - displays or updates your Git Town configuration
- git town new-branch-push-flag - configures whether new empty branches are pushed to origin
- git town main-branch - displays or sets the main development branch for the current repo
- git town offline - enables/disables offline mode
- git town perennial-branches - displays or updates the perennial branches for the current repo
- git town pull-branch-strategy - displays or sets the strategy with which perennial branches are updated
- git town set-parent-branch - updates a branch’s parent
Other Commands
- git town alias - adds or removes shorter aliases for Git Town commands
- git town install-fish-autocompletion - installs the autocompletion definition for Fish shell
- git town version - displays the installed version of Git Town
Installation
Since version 4.0, Git Town runs natively on all platforms without any dependencies. Check out our installation instructions for more details.
Aliasing
Each command can be
aliased individually to
remove the town
prefix with:
git config --global alias.hack 'town hack'
Now you can run git hack
instead of git town hack
. As a convenience, you can
add or remove global aliases for all git-town
commands with:
git town alias <true | false>
Configuration
Git Town is configured on a per-repository basis. Upon first use in a repository, you will be prompted for the required configuration. Use the git town config command to view or update your configuration at any time.
Required configuration
- the main development branch
- the perennial branches
Optional Configuration
The following configuration options have defaults, so the configuration wizard does not ask about them.
-
the pull branch strategy
- how to sync the main branch / perennial branches with their upstream
- default:
rebase
- possible values:
merge
,rebase
-
the new branch push flag
- whether or not branches created by hack / append / prepend should be pushed to remote repo
- default:
false
- possible values:
true
,false
Documentation
In addition to the online documentation here, you can run git town
on the
command line for an overview of the Git Town commands, or git help <command>
(e.g. git help sync
) for help with an individual command.
Contributing
Found a bug or have an idea for a new feature? Open an issue or - even better - get down, go to town, and fire a feature-tested pull request our way! Check out our contributing guide to start coding.