Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ironically, while git’s default behavior is to treat untracked files as precious, adding the file to <code>.gitignore</code> tells git that it can trash the file whenever it wants.</p> <p>Entries in <code>.gitignore</code> are more commonly used to indicate generated files, and as such git will overwrite them silently. Entries in <code>.git/info/exclude</code> are perhaps supposed to be used for local versions of configuration files.</p> <p>Please read <a href="http://comments.gmane.org/gmane.comp.version-control.git/153700" rel="nofollow" title="git merge, .gitignore, and silently overwriting untracked files">this discussion</a> in its entirety, as there seems to be some confusion as to the difference between the two. I just tried this out, and entries in <code>.git/info/exclude</code> are protected when you go back in time, producing "error: Untracked working tree file '.rvmrc' would be overwritten by merge." This different behavior between the two might not be deliberate, according to Junio C Hamano. However, if you can remove the entry from <code>.gitignore</code> and move it to <code>.git/info/exclude</code>, you might be able to make this work, realizing that the latter is not versioned or shared between repositories and would require manual cooperation with your colleague.</p> <p>As for the permissions issue, see this:</p> <pre><code>$ touch foo $ ls -l foo -rw-r--r-- 1 josh staff 0 Oct 1 09:55 foo $ sudo chown root:wheel foo $ ls -l foo -rw-r--r-- 1 root wheel 0 Oct 1 09:55 foo $ unlink foo $ ls -l foo ls: foo: No such file or directory </code></pre> <p>In Unix, the ability to create or remove a file is based only on the permissions of the <em>directory</em> that contains it. Permissions on the file itself are only for modifications to the file (unfortunately in your case). The <code>rm</code> utility checks permissions on the file as a courtesy, but <code>unlink</code> is lower-level and blindly calls the system call.</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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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