Advertisement
Guest User

Untitled

a guest
Nov 29th, 2021
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. I had a team member commit some work on a level design tool to our main branch, when that work should have gone in its own levelDesign branch
  2. so I did git checkout main to go to the main branch.
  3. then I did git reset --keep HEAD~1 to reset the main branch
  4. then I did git checkout -b levelDesign to checkout to a new branch from that reset version
  5. and git cherry-pick ..HEAD@{2} to cherry pick the commits back onto the levelDesign branch using the reflog.
  6.  
  7. then i set the upstream of the new leveldesign branch to origin/leveldesign and pushed it, and force pushed the master branch so the commit disappeared from that branch
  8. effectively just moving his commit to the new branch it should have been on (at least I hope lol)
  9. but now
  10. that same teammember has yet again committed to main
  11. how do I go about fixing this horror?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement