wengxyu1030 / Recode_V_training

This repository is only for training use.
1 stars 0 forks source link

Pakistan2006-210523 #22

Open jianingwwww opened 3 years ago

jianingwwww commented 3 years ago

This pull request is for #19 I marked the information in issue 19 content and made changes to the codes as far as I understand. If there is something I should have acted on but I didn't (probably because I don't know how to take actions), please correct me. Thank you! @robin-wang @yuqiliao

question 1: Is it possible to withdraw or change the commit? Sometimes I have made several commits and therefore could not use "undo" button but I need to change some codes, so I have to push a new commit, which makes the commit look untidy (anyway I will be more careful next time).

robin-wang commented 3 years ago

This pull request is for #19 I marked the information in issue 19 content and made changes to the codes as far as I understand. If there is something I should have acted on but I didn't (probably because I don't know how to take actions), please correct me. Thank you! @robin-wang @yuqiliao

question 1: Is it possible to withdraw or change the commit? Sometimes I have made several commits and therefore could not use "undo" button but I need to change some codes, so I have to push a new commit, which makes the commit look untidy (anyway I will be more careful next time).

From Yuqi, hope thiis helps: https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/

If you’ve already made several commits but have not pushed them yet, you could do “git reset” as described in the “Reset “local” changes” section of the article. However, I’m not aware that it’s possible to do it through GitHub desktop (it’s certainly possible in the console/command line). The other option is to push all the local commits, and then do “git revert”, which you can do it in the console/command line (which is the “Undo a “public” change” section of the same article) but you can also easily do it through the GitHub desktop. This approach may be what you mean by “I have to push a new commit button it looks untidy)” but it’s pretty safe so it’s okay.

jianingwwww commented 3 years ago

This pull request is for #19 I marked the information in issue 19 content and made changes to the codes as far as I understand. If there is something I should have acted on but I didn't (probably because I don't know how to take actions), please correct me. Thank you! @robin-wang @yuqiliao question 1: Is it possible to withdraw or change the commit? Sometimes I have made several commits and therefore could not use "undo" button but I need to change some codes, so I have to push a new commit, which makes the commit look untidy (anyway I will be more careful next time).

From Yuqi, hope thiis helps: https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/

If you’ve already made several commits but have not pushed them yet, you could do “git reset” as described in the “Reset “local” changes” section of the article. However, I’m not aware that it’s possible to do it through GitHub desktop (it’s certainly possible in the console/command line). The other option is to push all the local commits, and then do “git revert”, which you can do it in the console/command line (which is the “Undo a “public” change” section of the same article) but you can also easily do it through the GitHub desktop. This approach may be what you mean by “I have to push a new commit button it looks untidy)” but it’s pretty safe so it’s okay.

Thank you, That's helpful!

jianingwwww commented 3 years ago

@imarabbit Hi,please find my comments here.

Thank you for your comments!