0

I'm using the OS X github app with Git/Github, although I do occasionly go to the command line for more intrepid things.

I have a repo "serge-denimes-theme" which is used for production as well as small incremental updates. I simply work on my local version and commit/push for an update. There is only one (master) branch.

I want to make a major update to the repo but retain the current branch all the while for incremental updates. I figure the best way is to make a branch and work on that separately from the master branch. When the major update is ready I can merge it back to the master.

How would I go about making this branch and getting a local copy of it that I can work on and commit/push to without influencing the master branch?

Edit: The idea being I have both the master branch and the feature branch on my local environment separate from each other so I can work on them both independantly

1 Answer 1

0

I can't tell for the 'github app', but as you do have a command line, this is the general idea:

git checkout -b mybranch #branch 'mybranch' off the current branch, switch to it
#hack hack hack; commit changes
git checkout master #switch back to master branch
git merge mybranch #merge mybranch into master

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.