Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何撤回一个Pull Request #476

Open
xiaochaogezaici opened this issue Sep 1, 2017 · 4 comments
Open

如何撤回一个Pull Request #476

xiaochaogezaici opened this issue Sep 1, 2017 · 4 comments

Comments

@xiaochaogezaici
Copy link
Contributor

xiaochaogezaici commented Sep 1, 2017

刚刚提交 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
Copy link
Contributor Author

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

@xuminsmile
Copy link
Contributor

同问~

@xugy0926
Copy link
Owner

xugy0926 commented Sep 3, 2017

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

@ocweai
Copy link

ocweai commented May 13, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants