Hi Matabele,

> Further to this: I want to craft my commits -- not only squash them.
> In this case, I wanted to split the squashed commits into two separate
> PR. 
>
> An ideal workflow:
> - rebase my branch
> - collapse my commits into one neat commit
> - split the squashed commit back into neat PR's for possible merging

Maybe a misunderstanding, but if you squashed your commits into one, it
makes no sense to create 2 PRs. So if you want to create 2 separate PRs
that deal with separate things, you need to also have at least 2 commits.

A detailed example of a PR workflow

 1. Say you want to do one PR that is a feature and one PR that deals
    with a bug.
 2. For every one of the 2 PRs, you ideally create a new branch i.e.
    "fixforproblem1" and "newfeature2".
 3. Then when you work on the feature, you checkout "newfeature2"
 4. You do let's say five commits to this branch
 5. Now you start working on the bug and therefore checkout
    "fixforproblem1".
 6. You do two commits
 7. Now you remember you forgot something for the feature so you
    checkout "newfeature2" again.
 8. Add something and do a commit
 9. So now you have 6 commits for your feature branch and 2 for your bugfix.
10. Now its PR time
11. You first go to your "newfeature2" branch and squash all commits
    into one
12. You then go to your "fixforproblem1" branch and also squash all
    commits into one
13. Now you do push "newfeature2" to your git repository
14. After that you also push the "fixforproblem1" branch to your remote
    (github)
15. Then at Github, you go to each branch and do a PR to Jeremy's
    develop branch
16. Done. You have 2 PRs, each flattened to a single commit
17. Now Jeremy says you need to change something in your PR for
    "fixforproblem1".
18. On your local repo you checkout "fixforproblem1".
19. You change something and do a commit,
20. Now you have 2 commits in your "fixforproblem1" branch
21. flatten them again
22. do a "push --force" to your repo to completely override
    "fixforproblem1" on your remote
23. Done, your PR will only contain one commit with the updated changes

Hope it helps
Felix

>
> regards
>
> On Saturday, 30 January 2016 00:55:58 UTC+2, Felix Küppers wrote:
>
>     Hi Matabele,
>
>>     3. Now, when I create a PR on Github, all of my separate commits
>>     are included in one PR
>
>     Your PR includes all commits you did to your branch "checklist".
>     The more commits you add to this branch and push to your remote
>     (github), the more will show up in the PR.
>
>>     How do I keep my original commits separate through this entire
>>     process?
>
>     Your commits *are* separated. You did 5 separate commits. Instead,
>     of so many commits, you may consider to squash them into a single one:
>
>       * *Why squash git commits for pull requests?*
>         http://programmers.stackexchange.com/q/263164
>         <http://programmers.stackexchange.com/q/263164>
>       * *Squashing Github pull requests into a single commit*
>         
> http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit
>         
> <http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit>
>       * *How to Rebase a Pull Request*
>         https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request
>         
> <https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to tiddlywikidev+unsubscr...@googlegroups.com
> <mailto:tiddlywikidev+unsubscr...@googlegroups.com>.
> To post to this group, send email to tiddlywikidev@googlegroups.com
> <mailto:tiddlywikidev@googlegroups.com>.
> Visit this group at https://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywikidev/1c672076-baee-411c-ad0e-3fdbb6beb762%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywikidev/1c672076-baee-411c-ad0e-3fdbb6beb762%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/BLU436-SMTP139FD447F8207FCFC163458CEDC0%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to