Featured post
GIT re-merge files from dev to master -
my master git branch seams have errors i'd recheck, re-merge or possibly clone dev branch on master branch master branch copy of dev.
how can that? thx.
if problem checked-out files don't match branch, use git reset normally:
git reset --hard head that should need. however, if still want overwrite master dev, read on.
if want overwrite master branch contents of dev branch, use git reset so:
$ git checkout master $ git reset --hard dev and if want push somewhere else:
$ git push origin master note if dev branch doesn't fast-forward master branch (which i'm guessing won't, since said master branch has screwed stuff in it), you'll need add --force flag push overwrite on remote:
$ git push origin master --force note, however, can involve of normal caveats of rewriting history la git rebase - if else uses remote, they'll need deal equivalent of upstream rebase.
to avoid problem in future, advise friend using --force never necessary. if they're getting conflicts when try git push, should git pull first, resolve conflicts, , git push.
- Get link
- X
- Other Apps
Comments
Post a Comment