Tuesday, 15 March 2011

version control - Is it possible to 'reset' a git branch to an empty state? -



version control - Is it possible to 'reset' a git branch to an empty state? -

the company i'm @ abused git pretty hard several years. development done on master , long lived 'release' branch used releases. abuse people checked straight release much master no longer merged it, commits cherry picked release adhoc. history between 2 disaster. we've moved short lived release branches, our development branch, 'dev', branched old 'release' branch.

i start development on master 1 time again history contains tons of commits not in 'release' , never tested. tried several different ways deleting branch on remote in way no commits old master on local dev box pushed new master. want (in magical ideal world) is:

delete master on remote branch 'dev' new master push new master remote have no history old master pushed new master

having delete master locally , check out 1 time again straightforward solution hardest 30+ developers in multiple countries.

is there way on remote reject force if contains commit, or merges commit? know lastly commit on old master cherry picked release, if can identify pushes bring in older can rejected. other i'm not sure other possibilities there accomplish this.

git version-control merge git-branch

No comments:

Post a Comment