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.

> 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.

> -- 
> ================
> 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 majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to