简体   繁体   中英

Git - What happens to my local master branch after a pull request? How do I manage multiple in progress branches?

I originally was wondering what I do with branches that get accepted after a pull request, but I found this: Changing branches and delete branch in Git after successful pull request

Now I am wondering what happens if I am working on a project with my master sync'd to the original master but have five local branches created to implement different features. If these features are complete on my end but have not been accepted pull requests, what is the best way to create a local version with some/all of these branches included for compilation?

Would I create another branch and merge the master plus all/some these branches into it for my own testing depending on which branches I want to include for each test?

Yep, sounds like you're essentially wanting your own local integration branch(es). In that case, you would do just what you said; branch off the main line (or one of your feature branches if you want that as a starting point) and merge in the pieces you want.

That way you keep a pristine main line, but can still test your various features together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM