Partial pull request in SourceTree?

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
Accepted answer

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)

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
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

845 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you