Note that there are some explanatory texts on larger screens.

plurals
  1. POGit: copy part of branch to another branch
    primarykey
    data
    text
    <p>Let's say we have versions that are on separate branches.</p> <ul> <li>master</li> <li>v1</li> <li>v2</li> </ul> <p>Our workflow with SVN was that we made bug repairs on master and then merged them into v1 and v2, new features should wait until next version (v3) is created.</p> <p>This is how it looks after SVN to GIT conversion</p> <pre><code> ---v2----v2----v2 / M----M----M----M----M----M----M----M----M----M \ v1----v1----v1----v1---v1---v1 </code></pre> <p>M is master, v1 and v2 are version branches.</p> <p>Now let's say that someone will push commits "c" and "c1" on master.</p> <pre><code> ---v2----v2----v2 c1---c1---c1 / / \ M----M----M----M----M----M----M----M----M----M---c---c---c---c---c--c \ v1----v1----v1----v1---v1---v1 </code></pre> <p>How do you copy the part of the branch containing "c" and "c1" commits into v1? </p> <p>Expected result:</p> <pre><code> ---v2----v2----v2 c1---c1---c1 / / \ M----M----M----M----M----M----M----M----M----M---c---c---c---c---c--c \ c1---c1---c1 \ / \ v1----v1----v1----v1---v1---v1---c---c---c---c---c--c </code></pre> <p>I found out that cherry-pick lets me pick single commits and reapply them whenever I want. I think that rebase does what I want but I'm lost in rebase's arguments.</p> <p>This his how I think it should work:</p> <ul> <li><p>pull everything to local repo</p></li> <li><p>rebase c+c1 commits into v1 or v2</p></li> <li><p>push to our "central" repo</p></li> </ul> <p>Also, if there's another workflow alternative that would work for us, I'm really open to suggestions.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload