Commit 08266aa9 authored by cmosh's avatar cmosh

Merge branch 'feature/npm' into develop

- npm
parents d52664d3 9e4556b3
# This is the top-most .editorconfig file; do not search in parent directories.
root = true
[*]
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
[Changes.mdown]
indent_style = space
indent_size = 2
[*.mdown]
trim_trailing_whitespace = false
[{Makefile, makefile, GNUmakefile}]
indent_style = tab
indent_size = 4
debian/files node_modules/*
debian/*.substvars \ No newline at end of file
debian/*.debhelper.log
debian/*/*
.timelog
.seconds
.seconds-feature-workingtime
.timelog-feature-workingtime
.seconds-feature-sdsa
.timelog-feature-sdsa
.seconds-feature-finish_fix
.timelog-feature-finish_fix
.seconds-feature-finish_fix
.timelog-feature-finish_fix
.seconds-feature-finish_fix
.timelog-feature-finish_fix
.seconds-feature-interrupt
.timelog-feature-interrupt
.seconds-feature-interrupt_final_test
.timelog-feature-interrupt_final_test
.breaktime-feature-interrupt_final_test
.seconds-feature-interrupt_final_test
.timelog-feature-interrupt_final_test
.breaktime-feature-interrupt_final_test
.seconds-feature-interrupt_final_test
.timelog-feature-interrupt_final_test
.breaktime-feature-interrupt_final_test
.seconds-feature-shortcuts
.timelog-feature-shortcuts
.breaktime-feature-shortcuts
.seconds-feature-test
.timelog-feature-test
.breaktime-feature-test
[submodule "shFlags"]
path = shFlags
url = git://github.com/nvie/shFlags.git
#
# This list is used by git-shortlog to fix a few botched names in the
# git-flow repo, either because the author's full name was messed up and/or
# not always written the same way, making contributions from the same person
# appearing not to be so.
#
Eric Holmes <eric@ejholmes.net>
Eric J. Holmes <eric@ejholmes.net>
Stefan Näwe <stefan.naewe@atlas-elektronik.com>
Stefan Näwe <stefan.naewe+github@googlemail.com>
Authors are (ordered by first commit date): git-flow AVH Authors
- Vincent Driessen This software consists of voluntary contributions made by many
- Benedikt Böhm individuals. For exact contribution history, see the revision history
- Daniel Truemper (Changes.mdown) and logs, available at
- Jason L. Shiffer http://github.com/petervanderdoes/gitflow.
- Randy Merrill
- Rick Osborne
- Mark Derricutt
- Nowell Strite
- Felipe Talavera
- Guillaume-Jean Herbiet
- Joseph A. Levin
- Jannis Leidel
- Konstantin Tjuterev
- Kiall Mac Innes
- Jon Bernard
- Olivier Mengué
- Emre Berge Ergenekon
- Eric Holmes
- Vedang Manerikar
- Myke Hines
Portions derived from other open source works are clearly marked.
Peter van der Does
Vincent Driessen
Daniel Dehennin
Benedikt Böhm
Leonid Komarovsky
Felipe Talavera
Randy Merrill
Kevin Woo
Daniel Truemper
Eric J. Holmes
Fred Condo
Alexandre Dutra
Ben Loveridge
Florian Gamböck
Gergely Nagy
JP Toto
Kiall Mac Innes
Lorin Hochstein
Olivier Mengué
Stefan Näwe
Adam Gibbins
Alexander Groß
Alexander Norström
Alexander Zeitler
Brian St. Pierre
Cararus Eugeniu
Chad Walker
Craig Fowler
Emre Berge Ergenekon
Gregor A. Cieslak
Gruen Christian-Rolf (Kiki)
Guillaume-Jean Herbiet
James Moran
Jannis Leidel
Jason L. Shiffer
Jean Jordaan
Jelte Fennema
Joe Ebmeier
John Sivak
Jon Bernard
Joseph A. Levin
Joshua P. Tilles
Juan Rial
Justin Penney
Konstantin Tjuterev
Kridsada Thanabulpong
Leonardo Giordani
Mark Borcherding
Mark Derricutt
Mateusz Kaczmarek
Matias Hernan Lauriti
Nowell Strite
Opher Vishnia
Peter Schröder
Stefan Schüßler
Steffen Jaeckel
Steve Streeting
Tacit Sawk
Vedang Manerikar
eddie cianci
gmallard
raybec
Portions of the project are derived from other open source works are clearly
marked.
This file is auto generated, any changes will be lost.
This diff is collapsed.
This diff is collapsed.
# #
# Authors:
# Copyright 2012-2016 Peter van der Does. All rights reserved.
#
# Original Author:
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice, this
# this list of conditions and the following disclaimer. # list of conditions and the following disclaimer.
# # 2. Redistributions in binary form must reproduce the above copyright notice,
# 2. Redistributions in binary form must reproduce the above copyright # this list of conditions and the following disclaimer in the documentation
# notice, this list of conditions and the following disclaimer in the # and/or other materials provided with the distribution.
# documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# EVENT SHALL VINCENT DRIESSEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen.
# #
prefix=/usr/local prefix=/usr/local
datarootdir=$(prefix)/share
docdir=$(datarootdir)/doc/gitflow
# files that need mode 755 # files that need mode 755
EXEC_FILES=git-flow EXEC_FILES=git-flow
# files that need mode 644 # files that need mode 644
SCRIPT_FILES =git-flow-init SCRIPT_FILES =git-flow-init
SCRIPT_FILES+=git-flow-feature SCRIPT_FILES+=git-flow-feature
SCRIPT_FILES+=git-flow-bugfix
SCRIPT_FILES+=git-flow-hotfix SCRIPT_FILES+=git-flow-hotfix
SCRIPT_FILES+=git-flow-release SCRIPT_FILES+=git-flow-release
SCRIPT_FILES+=git-flow-support SCRIPT_FILES+=git-flow-support
SCRIPT_FILES+=git-flow-version SCRIPT_FILES+=git-flow-version
SCRIPT_FILES+=git-flow-log
SCRIPT_FILES+=git-flow-config
SCRIPT_FILES+=gitflow-common SCRIPT_FILES+=gitflow-common
SCRIPT_FILES+=gitflow-shFlags SCRIPT_FILES+=gitflow-shFlags
# Hook files
HOOK_FILES=$(wildcard hooks/*)
all: all:
@echo "usage: make install" @echo "usage: make install"
@echo " make uninstall" @echo " make uninstall"
install: install:
@test -f gitflow-shFlags || (echo "Run 'git submodule init && git submodule update' first." ; exit 1 )
install -d -m 0755 $(prefix)/bin install -d -m 0755 $(prefix)/bin
install -d -m 0755 $(docdir)/hooks
install -m 0755 $(EXEC_FILES) $(prefix)/bin install -m 0755 $(EXEC_FILES) $(prefix)/bin
install -m 0644 $(SCRIPT_FILES) $(prefix)/bin install -m 0644 $(SCRIPT_FILES) $(prefix)/bin
install -m 0644 $(HOOK_FILES) $(docdir)/hooks
uninstall: uninstall:
test -d $(prefix)/bin && \ test -d $(prefix)/bin && \
cd $(prefix)/bin && \ cd $(prefix)/bin && \
rm -f $(EXEC_FILES) $(SCRIPT_FILES) rm -f $(EXEC_FILES) $(SCRIPT_FILES)
test -d $(docdir) && \
rm -rf $(docdir)
# git-flow (AVH Edition)
A collection of Git extensions to provide high-level repository operations
for Vincent Driessen's [branching model](http://nvie.com/git-model "original
blog post"). This fork adds functionality not added to the original branch.
## Getting started
For the best introduction to get started with `git flow`, please read Jeff
Kreeftmeijer's blog post:
[http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/)
Or have a look at one of these screen casts:
* [How to use a scalable Git branching model called git-flow](http://buildamodule.com/video/change-management-and-version-control-deploying-releases-features-and-fixes-with-git-how-to-use-a-scalable-git-branching-model-called-gitflow) (by Build a Module)
* [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt)
* [On the path with git-flow](https://vimeo.com/codesherpas/on-the-path-gitflow) (by Dave Bock)
A quick cheatsheet was made by Daniel Kummer:
[http://danielkummer.github.io/git-flow-cheatsheet/](http://danielkummer.github.io/git-flow-cheatsheet/)
## Installing git-flow
See the Wiki for up-to-date [Installation Instructions](https://github.com/petervanderdoes/gitflow-avh/wiki/Installation).
## Integration with your shell
For those who use the [Bash](http://www.gnu.org/software/bash/) or [ZSH](http://www.zsh.org)
shell, you can use my [fork of git-flow-completion](https://github.com/petervanderdoes/git-flow-completion)
which includes several additions for git-flow (AVH Edition), or you can use the
original [git-flow-completion](http://github.com/bobthecow/git-flow-completion)
project by [bobthecow](http://github.com/bobthecow). Both offer tab-completion
for git-flow subcommands and branch names with my fork including tab-completion
for the commands not found in the original git-flow.
## FAQ
* See the [FAQ](http://github.com/petervanderdoes/gitflow-avh/wiki/FAQ) section
of the project Wiki.
* Version Numbering Scheme.
Starting with version 1.0, the project uses the following scheme:
\<MAJOR\>.\<MINOR\>.\<REVISION\>\
* AVH is the acronym of "A VirtualHome"
## Please help out
This project is under constant development. Feedback and suggestions are very
welcome and I encourage you to use the [Issues
list](http://github.com/petervanderdoes/gitflow-avh/issues) on Github to provide that
feedback.
Feel free to fork this repository and to commit your additions. For a list of
all contributors, please see the [AUTHORS](AUTHORS) file.
Any questions, tips, or general discussion can be posted to the Google group:
[http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users)
This is the original group set up to support the nvie branch, but I am monitoring
the list as well for any questions related to my version.
When you do post a question on the list please indicate which version you are,
using the complete version number.
## Contributing
Fork the repository. Then, run:
```shell
git clone -b master git@github.com:<username>/gitflow-avh.git
cd gitflow-avh
```
The `-b master` switch has to be added since the fork operation automatically
clones the `develop` branch of the official gitflow repository and cloning it
results in a local repository with just a `develop` branch.
If you do not have gitflow installed yet install it by running `make && make install`.
After that initialize the local gitflow repository with gitflow itself:
```shell
git flow init -d
git flow feature start <your feature>
```
Then, do work and commit your changes.
```shell
git flow feature publish <your feature>
```
When done, open a pull request to your feature branch.
## License terms
git-flow is published under the FreeBSD License, see the
[LICENSE](LICENSE) file. Although the FreeBSD License does not require you to
share any modifications you make to the source code, you are very much
encouraged and invited to contribute back your modifications to the community,
preferably in a Github fork, of course.
## git flow usage
### Initialization
To initialize a new repo with the basic branch structure, use:
git flow init [-d]
This will then interactively prompt you with some questions on which branches
you would like to use as development and production branches, and how you
would like your prefixes be named. You may simply press Return on any of
those questions to accept the (sane) default suggestions.
The ``-d`` flag will accept all defaults.
![Screencast git flow init](http://i.imgur.com/lFQbY5V.gif)
### Creating feature/release/hotfix/support branches
* To list/start/finish/delete feature branches, use:
git flow feature
git flow feature start <name> [<base>]
git flow feature finish <name>
git flow feature delete <name>
For feature branches, the `<base>` arg must be a branch, when omitted it defaults to the develop branch.
* To push/pull a feature branch to the remote repository, use:
git flow feature publish <name>
git flow feature track <name>
* To list/start/finish/delete release branches, use:
git flow release
git flow release start <release> [<base>]
git flow release finish <release>
git flow release delete <release>
For release branches, the `<base>` arg must be a branch, when omitted it defaults to the develop branch.
* To list/start/finish/delete hotfix branches, use:
git flow hotfix
git flow hotfix start <release> [<base>]
git flow hotfix finish <release>
git flow hotfix delete <release>
For hotfix branches, the `<base>` arg must be a branch, when omitted it defaults to the production branch.
* To list/start support branches, use:
git flow support
git flow support start <release> <base>
For support branches, the `<base>` arg must be a branch, when omitted it defaults to the production branch.
### Share features with others
You can easily publish a feature you are working on. The reason can be to allow other programmers to work on it or to access it from another machine. The publish/track feature of gitflow simplify the creation of a remote branch and its tracking.
When you want to publish a feature just use:
git flow feature publish <name>
or, if you already are into the `feature/<name>` branch, just issue:
git flow feature publish
Now if you execute `git branch -avv` you will see that your branch `feature/<name>` tracks `[origin/feature/<name>]`. To track the same remote branch in another clone of the same repository use:
git flow feature track <name>
This will create a local feature `feature/<name>` that tracks the same remote branch as the original one, that is `origin/feature/<name>`.
When one developer (depending on your work flow) finishes working on the feature he or she can issue `git flow feature finish <name>` and this will automatically delete the remote branch. All other developers shall then run:
git flow feature delete <name>
to get rid of the local feature that tracks a remote branch that no more exist.
### Using Hooks and Filters
For a wide variety of commands hooks or filters can be called before and after
the command.
The files should be placed in .git/hooks
In the directory hooks you can find examples of all the hooks available.
## Showing your appreciation
Of course, the best way to show your appreciation for the git-flow tool itself
remains contributing to the community. If you'd like to show your appreciation
in another way, however, consider donating through PayPal:
[![PayPal][2]][1]
[1]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=S85FXJ9EBHAF2&lc=US&item_name=gitflow&item_number=gitflow&no_note=0&cn=Add%20special%20instructions%20to%20the%20seller&no_shipping=1&rm=1&return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow&cancel_return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
[2]: https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif
git-flow # git-flow (Dreidev Edition)
========
A collection of Git extensions to provide high-level repository operations A collection of Git extensions to provide high-level repository operations
for Vincent Driessen's [branching model](http://nvie.com/git-model "original for Vincent Driessen's [branching model](http://nvie.com/git-model "original
blog post"). blog post"). This fork adds functionality not added to the original branch.
Getting started ## Getting started
---------------
For the best introduction to get started with `git flow`, please read Jeff For the best introduction to get started with `git flow`, please read Jeff
Kreeftmeijer's blog post: Kreeftmeijer's blog post:
...@@ -17,68 +16,56 @@ Or have a look at one of these screen casts: ...@@ -17,68 +16,56 @@ Or have a look at one of these screen casts:
* [How to use a scalable Git branching model called git-flow](http://buildamodule.com/video/change-management-and-version-control-deploying-releases-features-and-fixes-with-git-how-to-use-a-scalable-git-branching-model-called-gitflow) (by Build a Module) * [How to use a scalable Git branching model called git-flow](http://buildamodule.com/video/change-management-and-version-control-deploying-releases-features-and-fixes-with-git-how-to-use-a-scalable-git-branching-model-called-gitflow) (by Build a Module)
* [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt) * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt)
* [On the path with git-flow](http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock) * [On the path with git-flow](https://vimeo.com/codesherpas/on-the-path-gitflow) (by Dave Bock)
Installing git-flow A quick cheatsheet was made by Daniel Kummer:
-------------------
See the Wiki for up-to-date [Installation Instructions](https://github.com/nvie/gitflow/wiki/Installation).
[http://danielkummer.github.io/git-flow-cheatsheet/](http://danielkummer.github.io/git-flow-cheatsheet/)
Integration with your shell ## Installing git-flow
---------------------------
For those who use the [Bash](http://www.gnu.org/software/bash/) or
[ZSH](http://www.zsh.org) shell, please check out the excellent work on the
[git-flow-completion](http://github.com/bobthecow/git-flow-completion) project
by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all
git-flow subcommands and branch names.
npm -i gitflow (Mac and Linux users only)
FAQ ## Contributing
---
See the [FAQ](http://github.com/nvie/gitflow/wiki/FAQ) section of the project
Wiki.
Fork the repository. Then, run:
Please help out ```shell
--------------- git clone -b master git@github.com:<username>/gitflow.git
This project is still under development. Feedback and suggestions are very cd gitflow
welcome and I encourage you to use the [Issues ```
list](http://github.com/nvie/gitflow/issues) on Github to provide that
feedback.
Feel free to fork this repo and to commit your additions. For a list of all The `-b master` switch has to be added since the fork operation automatically
contributors, please see the [AUTHORS](AUTHORS) file. clones the `develop` branch of the official gitflow repository and cloning it
results in a local repository with just a `develop` branch.
Any questions, tips, or general discussion can be posted to our Google group: If you do not have gitflow installed yet install it by running `make && make install`.
[http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users)
Contributing After that initialize the local gitflow repository with gitflow itself:
------------
Fork the repository. Then, run:
git clone --recursive git@github.com:<username>/gitflow.git ```shell
cd gitflow git flow init -d
git branch master origin/master git flow feature start <your feature>
git flow init -d ```
git flow feature start <your feature>
Then, do work and commit your changes. **Hint**: ``export PATH=`pwd`:$PATH`` Then, do work and commit your changes.
from within the gitflow directory makes sure you're using the version of
gitflow you're currently developing.
git flow feature publish <your feature> ```shell
git flow feature publish <your feature>
```
When done, open a pull request to your feature branch. When done, open a pull request to your feature branch.
License terms ## License terms
-------------
git-flow is published under the liberal terms of the BSD License, see the git-flow is published under the FreeBSD License, see the
[LICENSE](LICENSE) file. Although the BSD License does not require you to share [LICENSE](LICENSE) file. Although the FreeBSD License does not require you to
any modifications you make to the source code, you are very much encouraged and share any modifications you make to the source code, you are very much
invited to contribute back your modifications to the community, preferably encouraged and invited to contribute back your modifications to the community,
in a Github fork, of course. preferably in a Github fork, of course.
## git flow usage
### Initialization ### Initialization
...@@ -93,56 +80,89 @@ those questions to accept the (sane) default suggestions. ...@@ -93,56 +80,89 @@ those questions to accept the (sane) default suggestions.
The ``-d`` flag will accept all defaults. The ``-d`` flag will accept all defaults.
![Screencast git flow init](http://i.imgur.com/lFQbY5V.gif)
### Creating feature/release/hotfix/support branches ### Creating feature/release/hotfix/support branches
* To list/start/finish feature branches, use: * To list/start/finish/delete feature branches, use:
git flow feature * Note, if installed via npm the 'git' can be dropped from every command.
git flow feature start <name> [<base>]
git flow feature finish <name>
For feature branches, the `<base>` arg must be a commit on `develop`. git flow feature (flow)
git flow feature start <name> [<base>] (flow feature start/flow start/git start)
git flow feature pause (flow feature pause/flow pause/git pause)
git flow feature interrupt (flow feature interrupt/flow interrupt/git interrupt)
git flow feature resume <name> (flow feature resume/flow resume/git resume)
git flow feature finish <name> (flow feature finish/flow finish/git finish)
git flow feature delete <name> (flow feature delete/flow delete/git delete)
For feature branches, the `<base>` arg must be a branch, when omitted it defaults to the develop branch.
* To push/pull a feature branch to the remote repository, use: * To push/pull a feature branch to the remote repository, use:
git flow feature publish <name> git flow feature publish <name> (flow feature publish/flow publish/git publish)
git flow feature pull <remote> <name> git flow feature review <name> (flow feature resume/flow review/git review)
git flow feature track <name> (flow feature resume/flow review/git review)
* To list/start/finish/delete release branches, use:
* To list/start/finish release branches, use: * Note, if installed via npm the 'git' can be dropped from every command.
git flow release git flow release
git flow release start <release> [<base>] git flow release start <release> [<base>]
git flow release finish <release> git flow release finish <release>
git flow release delete <release>
For release branches, the `<base>` arg must be a commit on `develop`. For release branches, the `<base>` arg must be a branch, when omitted it defaults to the develop branch.
* To list/start/finish hotfix branches, use: * To list/start/finish/delete hotfix branches, use:
git flow hotfix git flow hotfix
git flow hotfix start <release> [<base>] git flow hotfix start <release> [<base>]
git flow hotfix finish <release> git flow hotfix finish <release>
git flow hotfix delete <release>
For hotfix branches, the `<base>` arg must be a commit on `master`. For hotfix branches, the `<base>` arg must be a branch, when omitted it defaults to the production branch.
* To list/start support branches, use: * To list/start support branches, use:
git flow support git flow support
git flow support start <release> <base> git flow support start <release> <base>
For support branches, the `<base>` arg must be a commit on `master`. For support branches, the `<base>` arg must be a branch, when omitted it defaults to the production branch.
### Share features with others
You can easily publish a feature you are working on. The reason can be to allow other programmers to work on it or to access it from another machine. The publish/track feature of gitflow simplify the creation of a remote branch and its tracking.
When you want to publish a feature just use:
git flow feature publish <name>
or, if you already are into the `feature/<name>` branch, just issue:
git flow feature publish
Now if you execute `git branch -avv` you will see that your branch `feature/<name>` tracks `[origin/feature/<name>]`. To track the same remote branch in another clone of the same repository use:
git flow feature track <name>
This will create a local feature `feature/<name>` that tracks the same remote branch as the original one, that is `origin/feature/<name>`.
When one developer (depending on your work flow) finishes working on the feature he or she can issue `git flow feature finish <name>` and this will automatically delete the remote branch. All other developers shall then run:
git flow feature delete <name>
to get rid of the local feature that tracks a remote branch that no more exist.
Showing your appreciation ### Using Hooks and Filters
=========================
A few people already requested it, so now it's here: a Flattr button.
Of course, the best way to show your appreciation for the original For a wide variety of commands hooks or filters can be called before and after
[blog post](http://nvie.com/posts/a-successful-git-branching-model/) or the git-flow tool itself remains the command.
contributing to the community. If you'd like to show your appreciation in The files should be placed in .git/hooks
another way, however, consider Flattr'ing me: In the directory hooks you can find examples of all the hooks available.
[![Flattr this][2]][1] ## Showing your appreciation
[1]: http://flattr.com/thing/53771/git-flow Of course, the best way to show your appreciation for the git-flow tool itself
[2]: http://api.flattr.com/button/button-static-50x60.png remains contributing to the community.
\ No newline at end of file
#!/bin/sh
usage() {
echo "usage: bump-version <version-id>"
}
if [ $# -ne 1 ]; then
usage
exit 1
fi
if ! sed 's/^GITFLOW_VERSION=.*$/GITFLOW_VERSION='$1'/g' git-flow-version > .git-flow-version.new; then
echo "Could not replace GITFLOW_VERSION variable." >&2
exit 2
fi
mv .git-flow-version.new git-flow-version
git add git-flow-version
git commit -m "Bumped version number to $1" git-flow-version
...@@ -2,14 +2,25 @@ ...@@ -2,14 +2,25 @@
# git-flow make-less installer for *nix systems, by Rick Osborne # git-flow make-less installer for *nix systems, by Rick Osborne
# Based on the git-flow core Makefile: # Based on the git-flow core Makefile:
# http://github.com/nvie/gitflow/blob/master/Makefile # http://github.com/petervanderdoes/gitflow-avh/blob/master/Makefile
# Licensed under the same restrictions as git-flow: # Licensed under the same restrictions as git-flow:
# http://github.com/nvie/gitflow/blob/develop/LICENSE # http://github.com/petervanderdoes/gitflow-avh/blob/develop/LICENSE
# Updated for the fork at petervanderdoes
usage() {
echo "Usage: [environment] gitflow-installer.sh [install|uninstall] [stable|develop]"
echo "Environment:"
echo " PREFIX=$PREFIX"
echo " REPO_HOME=$REPO_HOME"
echo " REPO_NAME=$REPO_NAME"
exit 1
}
# Does this need to be smarter for each host OS? # Does this need to be smarter for each host OS?
if [ -z "$INSTALL_PREFIX" ] ; then if [ -z "$PREFIX" ] ; then
INSTALL_PREFIX="/usr/local/bin" PREFIX="/usr/local"
fi fi
if [ -z "$REPO_NAME" ] ; then if [ -z "$REPO_NAME" ] ; then
...@@ -17,62 +28,85 @@ if [ -z "$REPO_NAME" ] ; then ...@@ -17,62 +28,85 @@ if [ -z "$REPO_NAME" ] ; then
fi fi
if [ -z "$REPO_HOME" ] ; then if [ -z "$REPO_HOME" ] ; then
REPO_HOME="http://github.com/nvie/gitflow.git" REPO_HOME="https://github.com/dreidev/gitflow.git"
fi fi
EXEC_PREFIX="$PREFIX"
BINDIR="$EXEC_PREFIX/bin"
DATAROOTDIR="$PREFIX/share"
DOCDIR="$DATAROOTDIR/doc/gitflow"
EXEC_FILES="git-flow" EXEC_FILES="git-flow"
SCRIPT_FILES="git-flow-init git-flow-feature git-flow-hotfix git-flow-release git-flow-support git-flow-version gitflow-common gitflow-shFlags" SCRIPT_FILES="git-flow-init git-flow-feature git-flow-bugfix git-flow-hotfix git-flow-release git-flow-support git-flow-version gitflow-common gitflow-shFlags git-flow-config"
SUBMODULE_FILE="gitflow-shFlags" HOOK_FILES="$REPO_NAME/hooks/*"
echo "### gitflow no-make installer ###" echo "### git-flow no-make installer ###"
case "$1" in case "$1" in
uninstall) uninstall)
echo "Uninstalling git-flow from $INSTALL_PREFIX" echo "Uninstalling git-flow from $PREFIX"
if [ -d "$INSTALL_PREFIX" ] ; then if [ -d "$BINDIR" ] ; then
for script_file in $SCRIPT_FILES $EXEC_FILES ; do for script_file in $SCRIPT_FILES $EXEC_FILES ; do
echo "rm -vf $INSTALL_PREFIX/$script_file" echo "rm -vf $BINDIR/$script_file"
rm -vf "$INSTALL_PREFIX/$script_file" rm -vf "$BINDIR/$script_file"
done done
rm -rf "$DOCDIR"
else else
echo "The '$INSTALL_PREFIX' directory was not found." echo "The '$BINDIR' directory was not found."
echo "Do you need to set INSTALL_PREFIX ?"
fi fi
exit exit
;; ;;
help) help)
echo "Usage: [environment] gitflow-installer.sh [install|uninstall]" usage
echo "Environment:"
echo " INSTALL_PREFIX=$INSTALL_PREFIX"
echo " REPO_HOME=$REPO_HOME"
echo " REPO_NAME=$REPO_NAME"
exit exit
;; ;;
*) install)
echo "Installing git-flow to $INSTALL_PREFIX" if [ -z $2 ]; then
usage
exit
fi
echo "Installing git-flow to $BINDIR"
if [ -d "$REPO_NAME" -a -d "$REPO_NAME/.git" ] ; then if [ -d "$REPO_NAME" -a -d "$REPO_NAME/.git" ] ; then
echo "Using existing repo: $REPO_NAME" echo "Using existing repo: $REPO_NAME"
else else
echo "Cloning repo from GitHub to $REPO_NAME" echo "Cloning repo from GitHub to $REPO_NAME"
git clone "$REPO_HOME" "$REPO_NAME" git clone "$REPO_HOME" "$REPO_NAME"
fi fi
if [ -f "$REPO_NAME/$SUBMODULE_FILE" ] ; then
echo "Submodules look up to date"
else
echo "Updating submodules"
lastcwd=$PWD
cd "$REPO_NAME" cd "$REPO_NAME"
git submodule init git pull
git submodule update cd "$OLDPWD"
cd "$lastcwd" case "$2" in
fi stable)
install -v -d -m 0755 "$INSTALL_PREFIX" cd "$REPO_NAME"
git checkout master
cd "$OLDPWD"
;;
develop)
cd "$REPO_NAME"
git checkout develop
cd "$OLDPWD"
;;
*)
usage
exit
;;
esac
install -v -d -m 0755 "$PREFIX/bin"
install -v -d -m 0755 "$DOCDIR/hooks"
for exec_file in $EXEC_FILES ; do for exec_file in $EXEC_FILES ; do
install -v -m 0755 "$REPO_NAME/$exec_file" "$INSTALL_PREFIX" install -v -m 0755 "$REPO_NAME/$exec_file" "$BINDIR"
done done
for script_file in $SCRIPT_FILES ; do for script_file in $SCRIPT_FILES ; do
install -v -m 0644 "$REPO_NAME/$script_file" "$INSTALL_PREFIX" install -v -m 0644 "$REPO_NAME/$script_file" "$BINDIR"
done done
for hook_file in $HOOK_FILES ; do
install -v -m 0644 "$hook_file" "$DOCDIR/hooks"
done
exit
;;
*)
usage
exit exit
;; ;;
esac esac
...@@ -38,7 +38,6 @@ if errorlevel 4 if not errorlevel 5 goto :AccessDenied ...@@ -38,7 +38,6 @@ if errorlevel 4 if not errorlevel 5 goto :AccessDenied
if errorlevel 1 set ERR=1 if errorlevel 1 set ERR=1
xcopy "%~dp0\..\git-flow*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 xcopy "%~dp0\..\git-flow*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1
xcopy "%~dp0\..\gitflow-*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 xcopy "%~dp0\..\gitflow-*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1
xcopy "%~dp0\..\shFlags\src\shflags" "%GIT_HOME%\bin\gitflow-shFlags" /Y /R /F || set ERR=1
if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself." if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself."
...@@ -63,7 +62,6 @@ goto :End ...@@ -63,7 +62,6 @@ goto :End
:ChkGetopt :ChkGetopt
:: %1 is getopt.exe :: %1 is getopt.exe
if exist "%GIT_HOME%\bin\%1" goto :EOF if exist "%GIT_HOME%\bin\%1" goto :EOF
if exist "%USERPROFILE%\bin\%1" goto :EOF
if exist "%~f$PATH:1" goto :EOF if exist "%~f$PATH:1" goto :EOF
echo %GIT_HOME%\bin\%1 not found.>&2 echo %GIT_HOME%\bin\%1 not found.>&2
echo You have to install this file manually. See the GitFlow README. echo You have to install this file manually. See the GitFlow README.
......
...@@ -3,51 +3,90 @@ ...@@ -3,51 +3,90 @@
# git-flow -- A collection of Git extensions to provide high-level # git-flow -- A collection of Git extensions to provide high-level
# repository operations for Vincent Driessen's branching model. # repository operations for Vincent Driessen's branching model.
# #
# Original blog post presenting this model is found at: # A blog post presenting this model is found at:
# http://nvie.com/git-model # http://blog.avirtualhome.com/development-workflow-using-git/
# #
# Feel free to contribute to this project at: # Feel free to contribute to this project at:
# http://github.com/nvie/gitflow # http://github.com/petervanderdoes/gitflow
# #
# Authors:
# Copyright 2012-2016 Peter van der Does. All rights reserved.
#
# Original Author:
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice, this
# this list of conditions and the following disclaimer. # list of conditions and the following disclaimer.
# # 2. Redistributions in binary form must reproduce the above copyright notice,
# 2. Redistributions in binary form must reproduce the above copyright # this list of conditions and the following disclaimer in the documentation
# notice, this list of conditions and the following disclaimer in the # and/or other materials provided with the distribution.
# documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# EVENT SHALL VINCENT DRIESSEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen.
# #
# set this to workaround expr problems in shFlags on freebsd
if uname -s | egrep -iq 'bsd'; then export EXPR_COMPAT=1; fi
# enable debug mode # enable debug mode
if [ "$DEBUG" = "yes" ]; then if [ "$DEBUG" = "yes" ]; then
set -x set -x
fi fi
# The sed expression here replaces all backslashes by forward slashes. # Setup the GITFLOW_DIR for different operating systems.
# This helps our Windows users, while not bothering our Unix users. # This is mostly to make sure that we get the correct directory when the
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") # git-flow file is a symbolic link
case $(uname -s) in
Linux)
export GITFLOW_DIR=$(dirname "$(readlink -e "$0")")
;;
FreeBSD|OpenBSD|NetBSD)
export FLAGS_GETOPT_CMD='/usr/local/bin/getopt'
export GITFLOW_DIR=$(dirname "$(realpath "$0")")
;;
Darwin)
PRG="$0"
while [ -h "$PRG" ]; do
link=$(readlink "$PRG")
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="$(dirname "$PRG")/$link"
fi
done
export GITFLOW_DIR=$(dirname "$PRG")
;;
*MINGW*)
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
pwd () {
builtin pwd -W
}
;;
*)
# The sed expression here replaces all backslashes by forward slashes.
# This helps our Windows users, while not bothering our Unix users.)
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
;;
esac
# Extra environment settings
if [ -f ~/.gitflow_export ]; then
if grep -E 'GITFLOW_FLAG_(SHOWCOMMANDS|INIT|FEATURE|HOTFIX|RELEASE|SUPPORT)' ~/.gitflow_export > /dev/null; then
echo "Using environment variables for \"showcommands\", \"init\", \"feature\", \"hotfix\", \"release\" and \"support\" in ~/.gitflow_export has deprecated, use git config instead."
echo ""
exit 1;
else
. ~/.gitflow_export
fi
fi
usage() { usage() {
echo "usage: git flow <subcommand>" echo "usage: git flow <subcommand>"
...@@ -55,10 +94,13 @@ usage() { ...@@ -55,10 +94,13 @@ usage() {
echo "Available subcommands are:" echo "Available subcommands are:"
echo " init Initialize a new git repo with support for the branching model." echo " init Initialize a new git repo with support for the branching model."
echo " feature Manage your feature branches." echo " feature Manage your feature branches."
echo " bugfix Manage your bugfix branches."
echo " release Manage your release branches." echo " release Manage your release branches."
echo " hotfix Manage your hotfix branches." echo " hotfix Manage your hotfix branches."
echo " support Manage your support branches." echo " support Manage your support branches."
echo " version Shows version information." echo " version Shows version information."
echo " config Manage your git-flow configuration."
echo " log Show log deviating from base branch."
echo echo
echo "Try 'git flow <subcommand> help' for details." echo "Try 'git flow <subcommand> help' for details."
} }
...@@ -69,55 +111,99 @@ main() { ...@@ -69,55 +111,99 @@ main() {
exit 1 exit 1
fi fi
# load common functionality # Use the shFlags project to parse the command line arguments
. "$GITFLOW_DIR/gitflow-common"
# This environmental variable fixes non-POSIX getopt style argument
# parsing, effectively breaking git-flow subcommand parsing on several
# Linux platforms.
export POSIXLY_CORRECT=1
# use the shFlags project to parse the command line arguments
. "$GITFLOW_DIR/gitflow-shFlags" . "$GITFLOW_DIR/gitflow-shFlags"
FLAGS_PARENT="git flow" FLAGS_PARENT="git flow"
# allow user to request git action logging # Load common functionality
DEFINE_boolean show_commands false 'show actions taken (git commands)' g . "$GITFLOW_DIR/gitflow-common"
# do actual parsing # allow user to request git action logging
FLAGS "$@" || exit $? DEFINE_boolean 'showcommands' false 'Show actions taken (git commands)'
eval set -- "${FLAGS_ARGV}" # but if the user prefers that the logging is always on,
# use the environmental variables.
gitflow_override_flag_boolean 'showcommands' 'showcommands'
# sanity checks # Sanity checks
SUBCOMMAND="$1"; shift SUBCOMMAND="$1"; shift
if [ "${SUBCOMMAND}" = "finish" ] || [ "${SUBCOMMAND}" = "delete" ] || [ "${SUBCOMMAND}" = "publish" ] || [ "${SUBCOMMAND}" = "rebase" ]; then
_current_branch=$(git_current_branch)
if gitflow_is_prefixed_branch "${_current_branch}"; then
if startswith "${_current_branch}" $(git config --get gitflow.prefix.feature); then
SUBACTION="${SUBCOMMAND}"
SUBCOMMAND="feature"
_prefix=$(git config --get gitflow.prefix.feature)
_short_branch_name=$(echo ${_current_branch#*${_prefix}})
else
if startswith "${_current_branch}" $(git config --get gitflow.prefix.bugfix); then
SUBACTION="${SUBCOMMAND}"
SUBCOMMAND="bugfix"
_prefix=$(git config --get gitflow.prefix.bugfix)
_short_branch_name=$(echo ${_current_branch#*${_prefix}})
else
if startswith "${_current_branch}" $(git config --get gitflow.prefix.hotfix); then
SUBACTION="${SUBCOMMAND}"
SUBCOMMAND="hotfix"
_prefix=$(git config --get gitflow.prefix.hotfix)
_short_branch_name=$(echo ${_current_branch#*${_prefix}})
else
if startswith "${_current_branch}" $(git config --get gitflow.prefix.release); then
SUBACTION="${SUBCOMMAND}"
SUBCOMMAND="release"
_prefix=$(git config --get gitflow.prefix.release)
_short_branch_name=$(echo ${_current_branch#*${_prefix}})
fi
fi
fi
fi
fi
fi
if [ ! -e "$GITFLOW_DIR/git-flow-$SUBCOMMAND" ]; then if [ ! -e "$GITFLOW_DIR/git-flow-$SUBCOMMAND" ]; then
usage usage
exit 1 exit 1
fi fi
# run command # Run command
. "$GITFLOW_DIR/git-flow-$SUBCOMMAND" . "$GITFLOW_DIR/git-flow-$SUBCOMMAND"
FLAGS_PARENT="git flow $SUBCOMMAND" FLAGS_PARENT="git flow $SUBCOMMAND"
# test if the first argument is a flag (i.e. starts with '-') if [ -z "${SUBACTION}" ]; then
# in that case, we interpret this arg as a flag for the default # If the first argument is a flag, it starts with '-', we interpret this
# command # argument as a flag for the default command.
if startswith "$1" "-"; then
SUBACTION="default" SUBACTION="default"
if [ "$1" != "" ] && { ! echo "$1" | grep -q "^-"; } then elif [ -z "$1" ]; then
SUBACTION="$1"; shift SUBACTION="default"
else
SUBACTION="$1"
shift
# Do not allow direct calls to subactions with an underscore.
if $(contains "$SUBACTION" "_"); then
warn "Unknown subcommand: '$SUBACTION'"
usage
exit 1
fi
# Replace the dash with an underscore as bash doesn't allow a dash
# in the function name.
SUBACTION=$(echo "$SUBACTION" |tr '-' '_')
fi fi
fi
if ! type "cmd_$SUBACTION" >/dev/null 2>&1; then if ! type "cmd_$SUBACTION" >/dev/null 2>&1; then
warn "Unknown subcommand: '$SUBACTION'" warn "Unknown subcommand: '$SUBACTION'"
usage usage
exit 1 exit 1
fi fi
# run the specified action # Run the specified action
if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ] ; then if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ]; then
init initialize
fi
if [ $SUBACTION != 'default' ]; then
FLAGS_PARENT="git flow $SUBCOMMAND $SUBACTION"
fi fi
cmd_$SUBACTION "$@"
}
cmd_$SUBACTION "$@" "${_short_branch_name}"
}
main "$@" main "$@"
This diff is collapsed.
#
# git-flow -- A collection of Git extensions to provide high-level
# repository operations for Vincent Driessen's branching model.
#
# A blog post presenting this model is found at:
# http://blog.avirtualhome.com/development-workflow-using-git/
#
# Feel free to contribute to this project at:
# http://github.com/petervanderdoes/gitflow
#
# Authors:
# Copyright 2012-2016 Peter van der Does. All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
initialize() {
require_git_repo
require_gitflow_initialized
gitflow_load_settings
}
usage() {
OPTIONS_SPEC="\
git flow config [list]
git flow config set
git flow config base
Manage the git-flow configuration.
For more specific help type the command followed by --help
--
"
flags_help
}
parse_args() {
# Parse options
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
OPTION=$(echo $1|tr '[:upper:]' '[:lower:]')
if [ "$FLAGS_file" != "" ]; then
gitflow_config_option="--file '$FLAGS_file'"
elif flag local; then
gitflow_config_option="--local"
elif flag global; then
gitflow_config_option="--global"
elif flag system; then
gitflow_config_option="--system"
else
gitflow_config_option=""
fi
}
# Default entry when no SUBACTION is given
cmd_default() {
cmd_list "$@"
}
cmd_list() {
OPTIONS_SPEC="\
git flow config [list]
Show the git-flow configurations
--
h,help! Show this help
Use config file location
local! Use repository config file
global! Use global config file
system! Use system config file
file= Use given config file
"
local output
# Define flags
DEFINE_boolean 'local' false 'use repository config file'
DEFINE_boolean 'global' false 'use global config file'
DEFINE_boolean 'system' false 'use system config file'
DEFINE_string 'file' "" 'use given config file'
# Parse arguments
parse_args "$@"
output=$(git config $gitflow_config_option --get gitflow.branch.master)
echo "Branch name for production releases: $output "
output=$(git config $gitflow_config_option --get gitflow.branch.develop)
echo "Branch name for \"next release\" development: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.feature)
echo "Feature branch prefix: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.bugfix)
echo "Bugfix branch prefix: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.release)
echo "Release branch prefix: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.hotfix)
echo "Hotfix branch prefix: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.support)
echo "Support branch prefix: $output "
output=$(git config $gitflow_config_option --get gitflow.prefix.versiontag)
echo "Version tag prefix: $output "
}
cmd_set() {
OPTIONS_SPEC="\
git flow config set <option> <value>
Set the git-flow configuration option to the given value
--
h,help! Show this help
local! Use repository config file
global! Use global config file
system! Use system config file
file= Use given config file
"
local value cfg_option txt
# Define flags
DEFINE_boolean 'local' false 'use repository config file'
DEFINE_boolean 'global' false 'use global config file'
DEFINE_boolean 'system' false 'use system config file'
DEFINE_string 'file' "" 'use given config file'
# Parse arguments
parse_args "$@"
eval set -- "${FLAGS_ARGV}"
value=$2
case $OPTION in
master)
cfg_option="gitflow.branch.master"
txt="Branch name for production releases"
;;
develop)
cfg_option="gitflow.branch.develop"
txt="Branch name for \"next release\" development"
;;
feature)
cfg_option="gitflow.prefix.feature"
txt="Feature branch prefix"
;;
bugfix)
cfg_option="gitflow.prefix.bugfix"
txt="Bugfix branch prefix"
;;
hotfix)
cfg_option="gitflow.prefix.hotfix"
txt="Hotfix branch prefix"
;;
release)
cfg_option="gitflow.prefix.release"
txt="Release branch prefix"
;;
support)
cfg_option="gitflow.prefix.support"
txt="Support branch prefix"
;;
versiontagprefix)
cfg_option="gitflow.prefix.versiontag"
txt="Version tag prefix"
;;
allowmultihotfix)
cfg_option="gitflow.multi-hotfix"
txt="Allow multiple hotfix branches"
;;
*)
die_help "Invalid option given."
;;
esac
[ -n "$value" ] || die_help "No value given"
if [ $OPTION = "master" ]; then
develop_branch=$(git config --get gitflow.branch.develop)
if [ "$value" = $develop_branch ]; then
die "Production and \"next release\" branch should differ."
fi
if ! git_local_branch_exists "$value" && git_remote_branch_exists "origin/$value"; then
git_do branch "$value" "origin/$value" >/dev/null 2>&1
elif ! git_local_branch_exists "$value"; then
die "Local branch '$value' does not exist."
fi
fi
if [ $OPTION = "develop" ]; then
master_branch=$(git config --get gitflow.branch.master)
if [ "$value" = $master_branch ]; then
die "Production and \"next release\" branch should differ."
fi
if ! git_local_branch_exists "$value" && git_remote_branch_exists "origin/$value"; then
git_do branch "$value" "origin/$value" >/dev/null 2>&1
elif ! git_local_branch_exists "$value"; then
die "Local branch '$value' does not exist."
fi
fi
if [ $OPTION = "allowmultihotfix" ]; then
check_boolean "${value}"
case $? in
${FLAGS_ERROR})
die "Invalid value for option 'allowmultihotfix'. Valid values are 'true' or 'false'"
;;
*)
;;
esac
fi
git_do config $gitflow_config_option $cfg_option "$value"
case $? in
0)
;;
3)
die "The config file is invalid."
;;
4)
die "Can not write to the config file."
;;
*)
die "Unknown return code [$?]. Please file an issue about this error."
;;
esac
echo
echo "Summary of actions:"
if [ "$FLAGS_file" != "" ]; then
echo "- Using configuration file '$FLAGS_file'"
elif flag local; then
echo "- Using repository specific configuration file."
elif flag global; then
echo "- Using user-specific configuration file."
elif flag system; then
echo "- Using system-wide configuration file."
else
echo "- Using repository specific configuration file."
fi
echo "- $txt set to $value"
echo
}
cmd_base () {
OPTIONS_SPEC="\
git flow config base [<options>] <branch> [<base>]
Set the given <base> for the given <branch>
--
h,help! Show this help
get Get the base for the given branch (default behavior).
set Set the given base for the given branch.
"
DEFINE_boolean 'get' true 'Get the base for the given branch (default behavior).'
DEFINE_boolean 'set' false 'Set the given base for the given branch.'
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
if flag 'set'; then
[ -z "$1" ] && die_help 'No branch given'
[ -z "$2" ] && die_help 'No base given'
__set_base "$@"
else
[ -z "$1" ] && die_help 'No branch given'
__get_base "$@"
fi
}
cmd_help() {
usage
exit 0
}
# Private functions
__set_base () {
require_branch "$1"
git_branch_exists "$2" || die_help "Given base doesn't exists or is not a branch."
gitflow_config_set_base_branch "$2" "$1"
}
__get_base () {
local base
base=$(gitflow_config_get_base_branch "$1")
echo
if [ -z "$base" ]; then
echo "Base branch not set for branch '"$1"'"
else
echo "Base branch for branch '"$1"' set to '"$base"'"
fi
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# git-flow -- A collection of Git extensions to provide high-level
# repository operations for Vincent Driessen's branching model.
#
# A blog post presenting this model is found at:
# http://blog.avirtualhome.com/development-workflow-using-git/
#
# Feel free to contribute to this project at:
# http://github.com/petervanderdoes/gitflow
#
# Authors:
# Copyright 2012-2016 Peter van der Does. All rights reserved.
#
# Original Author:
# Copyright 2010 Vincent Driessen. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
initialize() {
require_git_repo
require_gitflow_initialized
gitflow_load_settings
}
usage() {
OPTIONS_SPEC="\
git flow log
shows current branch log compared to develop
'git help log' for arguments
--
"
flags_help
}
# Parse arguments and set common variables
parse_args() {
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
}
cmd_default() {
cmd_list "$@"
}
cmd_list() {
OPTIONS_SPEC="\
git flow feature log [<options>]
Show log on <feature> branch since the fork of <develop> branch
Options come from git log
--
h,help! Show this help
showcommands! Show git commands while executing them
"
# Parse arguments
parse_args "$@"
# get base branch from current branch
local base=$(gitflow_config_get_base_branch $(git_current_branch))
# no base branch found, comparing against $master
if [ -z $base ]; then
base=$MASTER_BRANCH
fi
# Get the log
echo "Comparing against \"$base\" branch\n"
git_do log "$@""$base.."
}
cmd_help() {
usage
exit 0
}
This diff is collapsed.
This diff is collapsed.
...@@ -2,48 +2,60 @@ ...@@ -2,48 +2,60 @@
# git-flow -- A collection of Git extensions to provide high-level # git-flow -- A collection of Git extensions to provide high-level
# repository operations for Vincent Driessen's branching model. # repository operations for Vincent Driessen's branching model.
# #
# Original blog post presenting this model is found at: # A blog post presenting this model is found at:
# http://nvie.com/git-model # http://blog.avirtualhome.com/development-workflow-using-git/
# #
# Feel free to contribute to this project at: # Feel free to contribute to this project at:
# http://github.com/nvie/gitflow # http://github.com/petervanderdoes/gitflow
# #
# Authors:
# Copyright 2012-2016 Peter van der Does. All rights reserved.
#
# Original Author:
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice, this
# this list of conditions and the following disclaimer. # list of conditions and the following disclaimer.
# # 2. Redistributions in binary form must reproduce the above copyright notice,
# 2. Redistributions in binary form must reproduce the above copyright # this list of conditions and the following disclaimer in the documentation
# notice, this list of conditions and the following disclaimer in the # and/or other materials provided with the distribution.
# documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# EVENT SHALL VINCENT DRIESSEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen.
# #
GITFLOW_VERSION=0.4.5 GITFLOW_VERSION=0.4.7
initialize() {
# A function can not be empty. Comments count as empty.
local FOO=''
}
usage() { usage() {
echo "usage: git flow version" OPTIONS_SPEC="\
git flow version
Shows version information.
For more specific help type the command followed by --help
--
"
flags_help
} }
cmd_default() { cmd_default() {
echo "$GITFLOW_VERSION dreidev" echo "$GITFLOW_VERSION (DREIDEV Edition -- drazious)"
} }
cmd_help() { cmd_help() {
......
This diff is collapsed.
#!/bin/bash
# git-flow make-less installer for *nix systems, by Rick Osborne
# Based on the git-flow core Makefile:
# http://github.com/nvie/gitflow/blob/master/Makefile
# Licensed under the same restrictions as git-flow:
# http://github.com/nvie/gitflow/blob/develop/LICENSE
# Does this need to be smarter for each host OS?
if [ -z "$INSTALL_PREFIX" ] ; then
INSTALL_PREFIX="/usr/local/bin"
fi
if [ -z "$REPO_NAME" ] ; then
REPO_NAME="gitflow"
fi
if [ -z "$REPO_HOME" ] ; then
REPO_HOME="http://github.com/nvie/gitflow.git"
fi
EXEC_FILES="git-flow"
SCRIPT_FILES="git-flow-init git-flow-feature git-flow-hotfix git-flow-release git-flow-support git-flow-version gitflow-common gitflow-shFlags"
SUBMODULE_FILE="gitflow-shFlags"
echo "### gitflow no-make installer ###"
case "$1" in
uninstall)
echo "Uninstalling git-flow from $INSTALL_PREFIX"
if [ -d "$INSTALL_PREFIX" ] ; then
for script_file in $SCRIPT_FILES $EXEC_FILES ; do
echo "rm -vf $INSTALL_PREFIX/$script_file"
rm -vf "$INSTALL_PREFIX/$script_file"
done
else
echo "The '$INSTALL_PREFIX' directory was not found."
echo "Do you need to set INSTALL_PREFIX ?"
fi
exit
;;
help)
echo "Usage: [environment] gitflow-installer.sh [install|uninstall]"
echo "Environment:"
echo " INSTALL_PREFIX=$INSTALL_PREFIX"
echo " REPO_HOME=$REPO_HOME"
echo " REPO_NAME=$REPO_NAME"
exit
;;
*)
echo "Installing git-flow to $INSTALL_PREFIX"
if [ -d "$REPO_NAME" -a -d "$REPO_NAME/.git" ] ; then
echo "Using existing repo: $REPO_NAME"
else
echo "Cloning repo from GitHub to $REPO_NAME"
git clone "$REPO_HOME" "$REPO_NAME"
fi
if [ -f "$REPO_NAME/$SUBMODULE_FILE" ] ; then
echo "Submodules look up to date"
else
echo "Updating submodules"
lastcwd=$PWD
cd "$REPO_NAME"
git submodule init
git submodule update
cd "$lastcwd"
fi
install -v -d -m 0755 "$INSTALL_PREFIX"
for exec_file in $EXEC_FILES ; do
install -v -m 0755 "$REPO_NAME/$exec_file" "$INSTALL_PREFIX"
done
for script_file in $SCRIPT_FILES ; do
install -v -m 0644 "$REPO_NAME/$script_file" "$INSTALL_PREFIX"
done
exit
;;
esac
This diff is collapsed.
#!/bin/sh
#
# Runs during git flow hotfix finish and a tag message is given
#
# Positional arguments:
# $1 Message
# $2 Full version
#
# Return MESSAGE
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
MESSAGE="$1"
# Implement your script here.
# Return the MESSAGE
echo "${MESSAGE}"
exit 0
#!/bin/sh
#
# Runs during git flow hotfix start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
# version is necessary
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
VERSION=$1
# Implement your script here.
# Return the VERSION
echo ${VERSION}
exit 0
#!/bin/sh
#
# Runs during git flow release branch and a tag message is given
#
# Positional arguments:
# $1 Message
# $2 Full version
#
# Return MESSAGE
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
MESSAGE="$1"
# Implement your script here.
# Return the MESSAGE
echo "${MESSAGE}"
exit 0
#!/bin/sh
#
# Runs during git flow release finish and a tag message is given
#
# Positional arguments:
# $1 Message
# $2 Full version
#
# Return MESSAGE
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
MESSAGE="$1"
# Implement your script here.
# Return the MESSAGE
echo "${MESSAGE}"
exit 0
#!/bin/sh
#
# Runs during git flow release start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
# version is necessary
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
# Implement your script here.
# Return the VERSION
echo ${VERSION}
exit 0
#!/bin/sh
#
# Runs at the end of git flow bugfix delete
#
# Positional arguments:
# $1 The version (including the version prefix)
# $2 The origin remote
# $3 The full branch name (including the bugfix prefix)
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
ORIGIN=$2
BRANCH=$3
# Implement your script here.
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Subproject commit 2fb06af13de884e9680f14a00c82e52a67c867f1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment