I am working on a phing script with git for build automation, and am still new to it. To give a little idea, we plan to have multiple branches in our project, and any of them could be rolled out (we are almost certain about this part).
During the course of development of my thought process for implementing the build script, I considered providing the git branch as an input to the build script for some time, then switched to providing the git revision instead (which could belong to any branch). Now, as my knowledge is increasing further, I am again in favor of using git branch references.
I would like to explore all the pros and cons of having either of these, which people have experienced, so that others have some reference to begin with.
The latest problem with using revisions that I realized today is that, it seems, I will have to pull all the branches to local in order to be able to find the one containing the revision, so that I can then move the working directory to that revision. Check How to take local working directory to any git revision irrespective of its branch after remote changes?.