Ben S Ben S - 10 months ago 76
Git Question

merging master to develop then cleaning master

I am very new to git.

Not so long ago I learnt about GitFlow, and I'd like to utilize it, however I have already got a long commit history in my master branch.

Can I move everything over to develop, so I'll get the whole history, and commiting only my latest release to master?

I am using Tower on my mac, but I am happy to use command line as well.


If you don't have a develop branch yet, you can simply create one at the right point of master:

git checkout -b develop master~1

That way, the last commit of master is in master only, all the other commits are part of the new develop branch.