I’ve been using Tower for a while for version control and to work locally and deploy a largish project that I run. I have it set up with Beanstalk and everything works great.
I’m at the stage where I want to rework a section of the site and I know its going to take a while and that there will be other maintenance that will need to be done during that time, so it seems to me the perfect place to create a branch.
But that’s where I am stuck… All the documentation says just right – click and add a new local branch… Great… but how do I work with the actual files.
Do I create a local duplicate copy of the site and commit that to the branch. Do I work on the same version of the site and just do the commits differently? But then what if I need an existing and a new version of the same file to be functional.
Can anyone point me in the right direction? I kind of understand how to make it work and commit it… but don’t understand how to organise it on my machine.
When you check out a branch, that site’s folder becomes that branch, so you only have one branch worth of files at any one time. So basically, nothing about your workflow changes, except that you know you’re on a different branch. Make sense?
Also, I would highly recommend taking the time to learn how to use Git from the command line.
@mtedwards – It took me a little while to grasp as well, but basically it just uses the existing files, so once you’re using a new branch the files just belong to that. You can switch to another branch at any time and the files will change to the last commit of that branch.
You don’t have seperate files/folders for each branch, Git will do all that for you when switching branches.