- This topic is empty.
February 22, 2013 at 6:10 am #42927
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.
Thanks a lot.February 22, 2013 at 7:38 am #125679Andy HowellsParticipant
@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.February 22, 2013 at 9:44 am #125686
Thanks for your help guys, but in still missing something. I think I must have it wrong conceptually in my head.
But using a real example… I’m working locally on a wordpress site and I want to revamp the file single-jobs.php in a separate branch.
If I start editing that file and commit to it a new branch what do I do if I need to make an edit to the existing one?
Or do I commit changes the separate branch and the if I need the old files I switch branches and pull that down?February 22, 2013 at 9:50 pm #125696
Ah. Great. I think typing it out made me realise the way it would work.
Thanks a lot for your help guys.
- The forum ‘Other’ is closed to new topics and replies.