Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Delete the folder from the repository, add it to .gitignore and then commit the changes. Push that commit to your central bare repo and you are (almost) fine.</strong></p> <p>The reason why git shows uncommited changes when you delete the folder is, that you in fact have changed something. You deleted the folder. gitignore doesn't stop that from happening. In fact, if you add a tracked file to <code>.gitignore</code>, git will <strong>not</strong> ignore that file (same applies for folders). <code>.gitignore</code> only works for untracked files.</p> <p>So, to untrack files inside a repository, you have to delete them (or at least make git think so) <strong>and</strong> add them to <code>.gitignore</code>. You can do that without actually deleting the files from the working directory:</p> <pre><code>git rm --cached &lt;files&gt; </code></pre> <p>The actual files will remain inside the working directory, but <code>git status</code> will show them as deleted. If you add them to <code>.gitignore</code> at the same time, the files will remain there forever, without git noticing it.</p> <p>However, if you commit that change and it gets pulled to somewhere else, the files will get deleted because git thinks you actually have deleted them. So you will need to get these files back (This will not make git track these files again as they are added to <code>.gitignore</code>):</p> <pre><code>git checkout HEAD~1 &lt;files&gt; </code></pre> <p>That will get the files back on that single repo. You will have to do that for every repo that pulled the commit you made above.</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.
    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