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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -