Git pull request for just one file

mankoff picture mankoff · Dec 7, 2011 · Viewed 49.3k times · Source

I've made multiple changes to two files in a Git repository (specifically, added two formulae to brew).

I committed the changes individually:

git commit file1
git commit file2

I then did one push to GitHub:

git push [email protected]:myname/homebrew.git

I'd now like to send two pull requests to the upstream repository, one for file1, one for file2. Is this possible?

Answer

Mat picture Mat · Dec 7, 2011

Put each file on its own branch. You can generate a pull request for each branch, which should do what you want.