Tuesday, 15 March 2011

version control - How to rename a remote branch in Git so that to have a proper history tree -



version control - How to rename a remote branch in Git so that to have a proper history tree -

i know might duplicate other similar questions, different.

my case:

we've been developing on master branch while , want apply branching model: a successful git branching model

so want accomplish rename remote master develop.

my steps:

git branch -m master develop

git force origin develop

git force origin :master //remove old remote master

at point create new master branch localy develop , force remotely: git force origin master

start using branching model:

i created couple of commits on develop branch. , want create release 1.

i going master. git merge --no-ff develop git force origin master

my problem:

i expect see commit history of old master on develop branch, still see initial commit on master branch:

at same time when switch develop branch , see log can see initial commit on develop branch.

question:

is possible accomplish want , how?

if create master branch develop, inherits , should inherit history of develop.

if created empty master branch there, have no history.

git version-control version-control-migration

No comments:

Post a Comment