Added a sample git-flow keybinding
[tig.git] / contrib / git-flow.tigrc
blob77593d45c41d9c74df755d866abf356c8463fc4a
1 # Bindings for git-flow.
3 # Flow bindings start with the capital F and then follow the first character of
4 # each operation. If executed from the refs view, the operations (that make
5 # sense to) work on the selected branch. Otherwise, they work on the currently
6 # checked out branch.
8 # Commands that finish a flow require confirmation to run. Commands that create
9 # a new flow prompt for user input and run when that input is accepted with no
10 # confirmation prompt.
12 # Note: Bindings assume the standard git-flow paths of feature, release, hotfix
13 # and support.
15 # To use these keybindings copy the file to your HOME directory and include it
16 # from your ~/.tigrc file:
18 #       $ cp contrib/git-flow.tigrc ~/.tigrc.git-flow
19 #       $ echo "source ~/.tigrc.git-flow" >> ~/.tigrc
21 # Get rid of default bindings for F, as that will be the entry point for all
22 # git-flow related commands with this binding.
23 bind main    F none
24 bind generic F none
26 # General
27 bind generic Fi ?git flow init
29 # Feature
30 bind generic Ffs !git flow feature start "%(prompt New feature name: )"
31 bind generic Fff ?sh -c "git flow feature finish `echo %(repo:head) | sed -e s/feature.//`"
32 bind refs    Fff ?sh -c "git flow feature finish `echo %(branch) | sed -e s/feature.//`"
34 # Release
35 bind generic Frs !git flow release start "%(prompt New release name: )"
36 bind generic Frf ?sh -c "git flow release finish `echo %(repo:head) | sed -e s/release.//`"
37 bind refs    Frf ?sh -c "git flow release finish `echo %(branch) | sed -e s/release.//`"
39 # Hot Fix
40 bind generic Fhs !git flow hotfix start "%(prompt New hotfix name: )"
41 bind generic Fhf ?sh -c "git flow hotfix finish `echo %(repo:head) | sed -e s/hotfix.//`"
42 bind refs    Fhf ?sh -c "git flow hotfix finish `echo %(branch) | sed -e s/hotfix.//`"
44 # Support
46 # Support is commented out, it is still a "very EXPERIMENTAL!" feature as described
47 # by git flow commands themselves. Further, the command for git flow support start
48 # isn't yet correct.
49 #bind refs    Fss !git flow support start "%(prompt New support name: )" %(branch)
50 #bind generic Fsf ?sh -c "git flow support finish `echo %(repo:head) | sed -e s/support.//`"
51 #bind refs    Fsf ?sh -c "git flow support finish `echo %(branch) | sed -e s/support.//`"