Home > Net >  Does VS Code have an option to re-commit?
Does VS Code have an option to re-commit?

Time:03-17

I'm working on a branch with another person. I pulled and got both of our changes from Gitlab. However when I did a undo commit in my VS Code, it was the their commit that got undone and not mines. This is a bit tricky for me because the first couple of undo commits were mines. I don't see an option to recommit so I'm wondering what is the best method here.

Option A: Just do another pull request and dig through the commits individually? (I haven't found the option where I can put in the commit code for SHA and undo that commit specifically)

Option B: Just stage their changes with their message commit and push like normal? (If I do this does this mean I will be the author in Gitlab?)

I'm not used to having others working in the same branch in the same area, so this is new for me. Are there other methods in VS Code?

CodePudding user response:

I decided to just go with Option A. It works just that I have to be-careful and read which commits are being undone and follow the tree in Gitlab.

Update: Just found out that VS Code has a cherry pick extension called GitCherry. The term I needed to know was cherry picking. I can use the terminal or the extension to cherry-pick commits which wont change the author.

  • Related