nus-cs2113-AY2021S1 / forum

8 stars 0 forks source link

Assistance needed for rewinding Git commits #62

Open Colin386 opened 4 years ago

Colin386 commented 4 years ago

Is there anyway for one to rewind the commits made on the repository. I have mistakenly forgot to make parallel branches for the JavaDoc branch and the dashboard did not seem to have detected my commits for the other assignments though I have tag them correctly. Thanks

image image

hughjazzman commented 4 years ago

From the page:

[This page was last updated on Sep 21 2020]

Looks like your commits were all after then. (The grading scripts have to be run, they aren’t automatic.)

ninggggx99 commented 4 years ago

Maybe you can make some edits and create a branch to push for that?

Colin386 commented 4 years ago

From the page:

[This page was last updated on Sep 21 2020]

Looks like your commits were all after then. (The grading scripts have to be run, they aren’t automatic.)

Oh... I see I see. No wonder the tags were not updated... Thanks for the help :).

Colin386 commented 4 years ago

Maybe you can make some edits and create a branch to push for that?

I guess I can try making a separate branch for the JavaDoc section. My concern is that it will no longer be in order with the other parts of the assignments such as the User Guide

okkhoy commented 4 years ago

You can:

(The final effect would be the same since you are picking commits that are already there and merging back, but would help the script detect the parallel branch)

Colin386 commented 4 years ago

Thanks prof.

I would like to clarify on how do we "cherry pick" the commits? Also, if I were to merge the branch will it end up merging at the very top of my master branch?

image

okkhoy commented 4 years ago

Checkout the branch-javadoc (pls follow the correct naming). Then right click on the commits you want to pick and select cherry-pick, accept the message that pops up. That is all. Your life will be easier if you do the cherry-picking in the same order as the commits.

Next you need to push your branch to your fork and create a PR. Then you can merge the PR. (however, I think your PR merge will say there is nothing to merge since the edits are there already -- not sure, do check)

Colin386 commented 4 years ago

Thanks for the help Prof. And thanks for the help everyone.

I have successfully created the parallel A-JavaDoc branch and produced the tag as shown. image

okkhoy commented 4 years ago

Cool!

okkhoy commented 4 years ago

Yes. Please read above for the process. The commands are listed here:

Create a PR and merge it.