Partial pull request in SourceTree?

Chris Crowley April 15, 2016

I'm working in a forked repository -- a new project based on a basic application framework.  I've set up an upstream remote to the original repository so that I can easily pull down changes from the framework.  But pushing minor changes back up has me struggling a bit.  

How can I create am upstream pull request for just a portion of the code base?

I can't see how to do that without trying to push my entire project back upstream.  I suppose I could (should?) make all such changes in a branch of the upstream repository, and then sync them down into my project, but that workflow is a bit unwieldy.  What's the best practice here?

 

1 answer

1 accepted

0 votes
Answer accepted
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2016

I think your proposed workflow sounds a lot cleaner even if it is unwieldy.   You could probably achieve your goals using git and a separate branch for the changes you want to push back to the original project, using careful use of the git cherry-pick command to put only those changes on to the branch you push back up.  But I think you'd probably have to go to the git command line for the cherry-picking, I'm not sure that functionality is supported in SourceTree.  And you'd have to be careful to select only those commits that made changes to the framework that you wanted to share (and be consistent about making those commits distinct from commits introducing code related to your new project)

Chris Crowley April 19, 2016

Thanks, Tim.  SourceTree does have a "cherry pick" function, but I've never played with it.  I suspect diff'ing my two work dirs to copy over tweaks would be easier than figuring out that feature.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events