Note that there are some explanatory texts on larger screens.

plurals
  1. POgit-svn problem with git add --patch resulting in conflicts
    primarykey
    data
    text
    <p>Basically when i want to commit two separate changes in the same file that resulted from an <code>git add --patch &lt;file&gt;</code> operation, git svn rebase later on throws 1-2 conflicts upon comitting the second change when using <code>git add</code> for the second change.</p> <p>so i'm basically doing this (i'm on master branch and have fetched the svn repository):</p> <pre><code>git checkout -b feature ... make two unrelated changes to file test.txt... git add --patch test.txt ... add first change but ignore second one git commit -m "change1" git stash git checkout master git merge feature git svn rebase git svn dcommit git checkout feature git stash apply </code></pre> <p>now here there's two ways to do it, first the one that works:</p> <pre><code>git add --patch test.txt ... select everything (which is the second change in this case) git commit -m "change 2" git checkout master git merge feature git svn rebase git svn dcommit </code></pre> <p>here's the one that doesn't work:</p> <pre><code>git add test.txt #notice there's no --patch git commit -m "change 2" git checkout master git merge feature git svn rebase #yields a conflict </code></pre> <p>So why is it that when using <code>git add --patch</code> for the second change, I can commit to the svn repository without problems, but when just using <code>git add</code> for the second change, it results in a conflict? I'm quite new to git, so this might be a stupid question, but as I see it, both commandsets should do exactly the same.</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.
 

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