getting-started-with-javascript icon indicating copy to clipboard operation
getting-started-with-javascript copied to clipboard

如何撤回一个Pull Request

Open xiaochaogezaici opened this issue 7 years ago • 4 comments

刚刚提交 Pull Request 没注意,DS_Store 文件忘记删除了,现在更新了我自己的 GitHub 站点,需要重新 Pull Request ,刚刚 Pull Request 里也有和我一样问题的同学,想问一下:

  1. 提交的Pull Request能不能撤销?如果能应该怎么做?我查到的答案是对已经merge成功的项目的删除,deleting-and-restoring-branches-in-a-pull-request,按照这个教程也没办法操作;

  2. 如果不能撤销,怎样能更快的 merge ,解决此类问题?

  3. 在下次提交前应该怎么操作,避免出现这个问题?

xiaochaogezaici avatar Sep 01 '17 04:09 xiaochaogezaici

@fanmilir 这个也是你的问题吧~~ @xugy0926

xiaochaogezaici avatar Sep 01 '17 04:09 xiaochaogezaici

同问~

xuminsmile avatar Sep 03 '17 12:09 xuminsmile

  1. pull request一旦发出,只能接收pr的人才能撤销。
  2. 如果你提交认为多带了文件,可以重新提一个pr把多余文件删除,然后在pr一次。
  3. 避免此类问题有两种方法。(1)在项目中我设置了一个gitignore文件,该文件里可以填入想要忽略的某些文件或者文件夹(事实上我设置了,但不清楚为啥在你们的电脑上不生效)。(2)不要用git add -A改用git add your_want_commit_file

xugy0926 avatar Sep 03 '17 15:09 xugy0926

第一种方案没毛病,我也遇到这问题了,只能等。 我还发出了两个错误的pull request O>O

ocweai avatar May 13 '20 02:05 ocweai