git - How to change one remote branch into an exact copy of another remote branch? -


i have 2 branches in remote. release , master. both branches have similar code. want code in release match master branch. means additional changes in release , not in master should destroyed , changes in master , not in release should placed release.

if literally mean want discard current release branch , recreate mirrors current master branch, command sequence use (in clean clone of repo) is

> git checkout -t origin/release > git reset --hard master > git push origin --force release:release 

but there's no way this


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -