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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -