My set up: Using Eclipse-based Flash Builder (Adobe product) which uses EGit.
I've got a client project up on gitHub and I've been working with it pretty well. There is the Master and then I created a "Develop" branch on Github. I have a local git version of the "Develop" branch – which I branch, work on, then merge to the GitHub "Develop" branch, and finally commit to Master.
(I know I am describing this badly – I looked at a bunch of tutorials and I think I have things basically set up correctly – but I am still new enough with Git that I am anxious about losing everything if I screw something up)
My Question I have been asked by the client to do a one-off version of their product with some changes which will not be merged to "Master" and I am wondering how I do this.
do I create a new branch on gitHub and then import that into a new Flash Builder project? (so I have two separate versions of the client's project in my local git directory)
do I create a new branch on gitHub, rebase my local version to that branch, make the changes, etc. and when done, rebase my local version back to the regular "Develop" branch?
I believe your first bullet point is correct. Although I don't believe you have to re-import this into a new Flash Builder project. Creating a new branch with git is seamless and easy.
Assuming you are on branch develop
, just do:
git checkout -b my_new_branch
If you want to push that to your remote so that other people can see it just do:
git push -u origin my_new_branch
when you want to switch back to develop:
git checkout develop
and if you get to a point where you want to merge my_new_branch into develop just do this from the feature branch:
git merge my_new_branch