overwrite everything in master with another branch in git -
i have out of date master branch in git repo. work has been done in branch. best way merge two? don't care in master, way out of date. thanks
if fine losing history of master branch let master point head of current branch (your don't "overwrite" master - branch - per se):
git checkout yourotherbranch git branch -d master git checkout -b master of course if have remote clone, you'll have
git push -f origin master nota bene: specifically applies replacing whole of master branch , throwing old master away title suggests. otherwise, should fine git merge master --strategy=ours.
Comments
Post a Comment