Debian Codegraph @

examples/git/git_branch.py

raw
1 """
2 usage: git branch [options] [-r | -a] [--merged=<commit> | --no-merged=<commit>]
3 git branch [options] [-l] [-f] <branchname> [<start-point>]
4 git branch [options] [-r] (-d | -D) <branchname>
5 git branch [options] (-m | -M) [<oldbranch>] <newbranch>
6
7 Generic options
8 -h, --help
9 -v, --verbose show hash and subject, give twice for upstream branch
10 -t, --track set up tracking mode (see git-pull(1))
11 --set-upstream change upstream info
12 --color=<when> use colored output
13 -r act on remote-tracking branches
14 --contains=<commit> print only branches that contain the commit
15 --abbrev=<n> use <n> digits to display SHA-1s
16
17 Specific git-branch actions:
18 -a list both remote-tracking and local branches
19 -d delete fully merged branch
20 -D delete branch (even if not merged)
21 -m move/rename a branch and its reflog
22 -M move/rename a branch, even if target exists
23 -l create the branch's reflog
24 -f, --force force creation (when already exists)
25 --no-merged=<commit> print only not merged branches
26 --merged=<commit> print only merged branches
27
28 """
29 from docopt import docopt
30
31
32 if __name__ == '__main__':
33 print(docopt(__doc__))