Skip to content

golflima/git-xflow

Repository files navigation

git-xflow

An extension to git-flow, which automatize some usual tasks related to repository operations.

Getting started

As git xflow extends git flow, it is required to know what git flow is about:

Of course, a knowledge of git is also required:

git xflow automatizes some reccurent tasks with git flow, such as:

  • git xflow feature/release/hotfix close to finish and push a feature/release/hotfix
  • git xflow staging to merge the content of unfinished features into a staging (demonstration) branch
  • git xflow hotfix publish/pull to publish and pull a hotfix
  • and many more !

To get help, just type in a terminal : git xflow

Install git-xflow

git xflow runs on Windows, Linux, and Mac OS. In facts, it runs everywhere git is able to run.

  1. Install git-flow
  2. Clone or download git-xflow, then unzip files ...
  3. Put files into a PATH listed folded (see details for Windows and Linux)
  4. For Linux only, make gix-flow file executable with:
    • chmod +x git-xflow
  5. Test it, type in a terminal : git xflow

NB : File gitflow-common is taken from git-flow directly, you don't have to copy it if you use latest version of git-flow and have put file git-xflow in the same folder as git-flow files.

git-xflow requires Bourne Again Shell (bash).

Install git-xflow on Debian

Simply run this script:

curl -sL https://raw.githubusercontent.com/golflima/git-xflow/master/install/install.sh | sudo bash -

Command-line reference

See [Command-line Reference.md](docs/Command-line Reference.md) in docs folder.

Quick setup of git-xflow in a git repository

  1. Initialize git-xflow:
    • git xflow init -d
    • You may want to configure each options with: git xflow init
  2. Optionnaly, tell git-xflow to automatically open generated files from templates (when calling git xflow patch or git xflow review for example):
    • On Windows, to automatically open html files generated by reviews with Google Chrome:
      • git config --add gitxflow.exec.html '"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"'
    • On Linux / Mac OS, to automatically open html files generated by reviews with Google Chrome:
      • git config --add gitxflow.exec.html "google-chrome"
    • On all platforms, to automatically open log files with less:
      • git config --add gitxflow.exec.log "less"
    • On all platforms, to automatically test generated zip archives:
      • git config --add gitxflow.exec.zip "unzip -t"

Quick overview of major git-xflow features

  1. Start working on a new feature A by typing:
    • git xflow feature start A
  2. Do some work and commit your changes with: git commit
  3. Start working on another new feature B:
    • git xflow feature start B
  4. Do some work and commit your changes with: git commit
  5. Send your changes to staging branch, only for feature A, by typing:
    • git xflow staging reset A (this will reset staging branch)
  6. Then, send your changes from feature B to staging by typing:
    • git xflow staging merge B
  7. Review changes of feature A with a HTML file by typing:
    • git xflow feature review A -t html
  8. Review changes of feature B with less file by typing:
    • git xflow feature review B -t less
  9. Finish your work on your features by typing:
    • git xflow feature close A
    • git xflow feature close B
  10. Eventually, reset your staging branch to a clean state (develop), by typing:
    • git xflow staging reset
  11. Do a release 1.0.0 for your new features by typing:
    • git xflow release start 1.0.0
  12. Share your work on this release 1.0.0 with your peers by typing:
    • git xflow release publish 1.0.0
  13. Start working on a shared release 1.0.0 by typing:
    • git xflow release pull 1.0.0
  14. Finish and publish release 1.0.0 by typing:
    • git xflow release close 1.0.0
  15. Build a patch to deploy changed files on your remote server which does not have Git by typing:
    • git xflow tag patch (will make a patch from previous published tag to the new one)

Licence terms

git-xflow is published under the terms of GNU Lesser General Public License v3, see the LICENSE file.

Although the GNU LGPLv3 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.

For a list of all contributors, please see the AUTHORS file.

Support

You can support this project with Flattr