3

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?

Name McChange
  • 2,750
  • 5
  • 27
  • 46

1 Answers1

2

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Then pull the changes back into my master branch from the dedicated branch? – Name McChange Jan 01 '15 at 21:00
  • @NameMcChange no, a `master` should reflect the `master` of the original repo. You will rebase your `master` branch (with its modified `README.md`) on top of a fetched `upstream/master`, and that will include your PR commits if that PR was accepted and merged in the original repo. – VonC Jan 01 '15 at 21:06
  • 1
    Alright, I get it now. I don't like it, but I get it. – Name McChange Jan 01 '15 at 21:35