I am writing shell script to deploy a git
branch from a remote repo.
This is the command I am using:
git clone -q --depth=1 https://my.repourl.com/git-repo.git /my/destination/folder -b develop
The problem is, if the branch (develop in this case) is wrong, it just ignores and pulls from the master branch (?). I get this message:
warning: Remote branch devel not found in upstream origin, using HEAD instead
I just want git to die/exit, if it does not find the branch specified. Any flags for that?
Or any alternatives? git-archive
did not work for some reason.