git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fatal: Unable to mark file .ruby-version

From
t.gummerer@gmail.com <t.gummerer@gmail.com>
Date
Mar 15, 2015, 16:58 UTC
Message-ID
<20150315165819.GA17591@hank>
In-Reply-To
<7217253.Nyz2WfkBbo@linux-wzza.site>
On 03/15, Arup Rakshit wrote:
Show 28 quoted lines
> On Sunday, March 15, 2015 01:30:04 PM you wrote:
> > Hi,
> > 
> > On 03/15, Arup Rakshit wrote:
> > > Hi,
> > > 
> > > I am trying to ignore 2 files, but getting error -
> > > 
> > > [arup@sztukajedzenia (SJ002)]$ git status
> > > # On branch SJ002
> > > # Untracked files:
> > > #   (use "git add <file>..." to include in what will be committed)
> > > #
> > > #       .ruby-gemset
> > > #       .ruby-version
> > > nothing added to commit but untracked files present (use "git add" to track)
> > > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-gemset
> > > fatal: Unable to mark file .ruby-gemset
> > > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-version
> > > fatal: Unable to mark file .ruby-version
> > > [arup@sztukajedzenia (SJ002)]$
> > 
> > With --assume-unchanged you're promising git that you will not change
> > a file that is already in the repository.  Git doesn't check those
> > files for changes anymore, which can improve performance.
> > 
> 
> I didn't understand your point. Could you please elaborate more on it ?

--assume-unchanged only works on files that you added on the repository, not on untracked files. Because you don't seem to want these files in the repository, update-index --assume-unchanged will not work for you.

Show 24 quoted lines
> > > Why it is throwing error ? And how to achieve this without taking
> > > the help of the file `.gitignore` ?
> > 
> > You can create a file .git/info/exclude in the root directory of the
> > repository with the same syntax as .gitignore to ignore these files.
> > This rules will not be commited in the repository.
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> -- 
> ================
> Regards,
> Arup Rakshit
> ================
> Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
> 
> --Brian Kernighan
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Thomas Gummerer
Previous: Arup RakshitNext: Kevin D
Message 4 of 6 in “fatal: Unable to mark file .ruby-version”
  1. Arup RakshitMar 15, 2015
  2. t.gummerer@gmail.comMar 15, 2015
  3. Arup RakshitMar 15, 2015
  4. t.gummerer@gmail.comMar 15, 2015
  5. Kevin DMar 15, 2015
  6. Arup RakshitMar 16, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.