Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I force git to think a file is unmerged?
    primarykey
    data
    text
    <p>I want to make changes to a file in my repo, then force git to believe the file is unmerged and show up in <code>git status</code> like so:</p> <pre><code># Unmerged paths: # (use "git reset HEAD &lt;file&gt;..." to unstage) # (use "git add &lt;file&gt;..." to mark resolution) # # both modified: lib/delayed/recipes.rb # </code></pre> <p>That's the entirety of my question. Read on for an explanation of why, since I know that's the first thing that will be asked.</p> <p>The purpose here is a bugfix for <a href="http://piston.rubyforge.org/" rel="noreferrer">Piston</a> which today leaves merge conflicts in the index where they are too easily overlooked.</p> <p>The way <code>piston update</code> works with a Git repo is:</p> <ul> <li>Clone the remote repo into a new temporary git repo</li> <li>Checkout that temp repo to the last commit we saw (saved in .piston.yml)</li> <li>Checkout our local repo (in a new branch) to the last commit where .piston.yml was updated</li> <li>Copy our local repo's files into the temp repo</li> <li>Commit all changes in the temp repo (these are our local changes as of the last time we updated this vendored project)</li> <li>Run <code>git merge master</code> in the temp repo to merge our local changes with the remote repo's changes</li> <li>IGNORE MERGE CONFLICTS(!) and copy all the files from the temp repo to our local repo</li> <li>Commit those files (in our new temp branch) to our local repo</li> <li>Checkout local repo back to our original starting point</li> <li>Merge temp branch into local repo (adds any further changes we have made)</li> </ul> <p>I expect to fix this problem by allowing the file with merge conflicts to be committed into the temp branch, but at the very end (after it runs <code>git merge --squash</code>) I want to tell git about the files that had a merge conflict in the temp repo.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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