I'm working on a project that has just a single master branch and there are two servers, a testing one with an up-to-date working copy, and a production one whose working-copy is behind.
I'd like to have the production and testing each have their own branches (with production server using the master branch). The difficulty is that the production working copy has some files more updated than others, e.g. when critical bug fixes were fixed, just single files were brought up to date.
How do you go about creating a new branch from the production working-copy even though it's files are at different points from the masters history?
The copy in production should always be your
master
. Branches on staging can be ahead in some ways and you shouldgit pull [remote] master
before ever submitting a pull request intomaster
with your new branch on staging.