Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.




show current branch

git branch

show all branches (including remote branches)

git branch -a

non-merged branches

git branch --no-merged

merged branches

git branch --merged

create branch

git branch name

go to a specific branch (also tags)

git checkout branchname


git checkout master

shortcut for creating a branch and checking it out

git checkout -b branchname

push branch changes

git push -u pushable branchname

get branch from repository

git checkout remotes/origin/branchname

change branch number of steps

git checkout master^^ (go back two steps)