A merge will not be sufficient, since you will have the changes from both branches (develop + master) in the develop branch after the merge.
If you want to get rid of the current develop branch and create a new one, do the following:
# Check out the master branch
git checkout master
# Delete the current develop branch
git branch -D develop
# Create a new develop branch
git checkout -b develop
Only do this if you are really sure that you don't care about the current develop
branch!
If you have a remote copy of the develop
branch, you will have to take caution when pushing the new branch:
- Either delete the remote branch first (before pushing the new one):
git push origin :develop
, or
- Push with the
--force
switch
Both will change the history for other people that have previously pulled the current develop
branch.