git - Recovering Lost Commits After Push -
i use recovery strategy. somehow ended in position 1 commit dropped 3 days worth of commits. and got pushed. committer isn't sure whether did forced push or what, we're in position. , 10 additional commits have been pushed since "bad" one.
all of old commits there , piece together, i'm hoping git can me out. suppose cherry-pick range of commits between point , point b, there better? most, not all, of changes local 1 directory , i'd rather not manually inspect each one.
what's right approach here remembering has been pushed upstream?
git reset --hard <one commit before bad commit> git cherry-pick <the range of commits you've lost> git pull
this way simulate on last commit (with reset
). create new commits locally (cherry-pick
). pull in changes (and maybe merge conflicts).
Comments
Post a Comment