Git

Git shell command checkout out branch if exists else create one

Posted on Updated on

git rev-parse --quiet --verify <branch-name> && git checkout <branch-name> || git checkout -b <branch-name>