I have "myapp" folder under git. Several branches are used (master, dev, test, prod, ...). I'd like to make an external shell script (script that is not in the "myapp" folder) to deploy a given branch to a web server.
How can I select a dedicated branch from an external script?
The idea is to use something like:
cp -r myapp@dev my_we_folder_path
# myapp@dev beeing the dev branch of myapp folder
Obviously, myapp@dev is not a correct git notation, but is there something equivalent in git?