Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude readme from Github pull request

Tags:

git

github

I'm using Github and trying to create a pull request on someone else's project that I have forked. I edited the Readme.md in my fork, but I don't want them to get that commit.

How do I do that? It seems painfully simple but I cannot figure it out. Right now I've simply copypasted the original Readme.md back into my project and made the pull request, but that seems counterintuitive.

What's the best way to go about this?

like image 632
Name McChange Avatar asked Jul 12 '26 20:07

Name McChange


1 Answers

All you need to do is:

  • make sure to create a branch from master, from a commit before your README.md modification (typically, from upstream/master, with upstream being the name of the remote original repo that you forked)
  • make your changes in that branch (which does not include the README.md modification)
  • make your pull request from that dedicated branch (as recommended in "couple tips for PR").

While you are adding your changes/fixes in that branch, you can modify whatever you want in your master branch, including the README.md.

like image 84
VonC Avatar answered Jul 14 '26 13:07

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!