0

I'm new to git and I'm working on a group project. I accidentally committed something wrong and now I want to undo that commit. The problem is that my teammates have pushed their commits after mine commit. And now I can't pull their commit since there is a conflict. Is there a way for me to undo the commit without ruin my teammates' work? I found a lot of posts suggested to use "Reset master to this commit". but I'm afraid that might cancel the commit my teammate made too.

1 Answers1

0

Check out my answer on a similar question here.

You can delete commits when rebasing interactively. But do it with caution, so you don't end up messing up your repo. I suggest you branch out, and do your experiments on this branch first.

jna
  • 926
  • 10
  • 18