]> git.phdru.name Git - git-scripts.git/blob - git-current-branch
Feat(submodules/remove): Add option `-c`
[git-scripts.git] / git-current-branch
1 #! /bin/sh -x
2 # List ways to get the current branch name.
3 # Compare the output after "git checkout master" and "git checkout master~1".
4
5 git branch --show-current
6 git describe --all
7 git name-rev --name-only HEAD
8
9 git rev-parse --abbrev-ref HEAD
10 git rev-parse --symbolic-full-name --abbrev-ref HEAD
11
12 git symbolic-ref --short -q HEAD; echo $?
13 git symbolic-ref --short HEAD
14 git symbolic-ref HEAD