5

In one commit, I have changed several files in several folders, say, folderA, folderB, and folderC. In folderA the changes are just adding comments and some code for printing intermediate results, which serve my own understanding. folderB, folderC are newly created, in there I have written some code for the project, now I want to only send a pull request for folderB and folderC, how would you do that?
Either working from the github webpage or the command line will be helpful.

Allanqunzi
  • 3,230
  • 1
  • 26
  • 58
  • When you do a pull request in Git, you pull the entire repository (both folders in your example given above). Try looking into subrepositories. – Tim Biegeleisen Jul 29 '15 at 03:41
  • You can fetch a specific commit - eg. http://stackoverflow.com/questions/14872486/pull-a-specific-commit-from-a-remote-git-repository But it will have all files present in that branch/commit. Also note the comments about how a pull isn't very 'expensive' as it's a delta (or "newly added code"); so as long as the local repo is similar to the changes it will be minimal transfer. – user2864740 Jul 29 '15 at 03:42
  • @TimBiegeleisen, can you give an example? – Allanqunzi Jul 29 '15 at 03:56
  • Update your question with your specific scenario and I'll try to answer. – Tim Biegeleisen Jul 29 '15 at 03:57
  • @TimBiegeleisen, I have reedited my question, much appreciated. – Allanqunzi Jul 29 '15 at 04:25
  • I won't attempt an answer because my sense is that you are trying to use Git as if it is a file-based version control system, which it is not. Please read up on some Git tutorials. – Tim Biegeleisen Jul 29 '15 at 04:29

1 Answers1

2

You cannot. You can send a pull request for a specific branch. The general way to do this is to put all the changes you want to on a topic branch and then to send a pull request for this branch.

Noufal Ibrahim
  • 71,383
  • 13
  • 135
  • 169