Open jianingwwww opened 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.
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!
@imarabbit Hi,please find my comments here.
Thank you for your comments!
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).