On Mon, Jan 13, 2014 at 12:07 PM, Valerio Pachera <siri...@gmail.com> wrote:
> Hi, I created a new document by the editor kate.
> I initialized the repo and run the first commit.
> I noticed that the commit include the temporary file that kate creates for
> its own purpose: nomefile.txt~.
> I removed the comment to '*~' in '.git/info/exclude'.
> The I run 'git commit --amend'.
> I'm able to change the text of the commit but how do I un-track the file
> that ends with '~' ? (If possible).
>
> Git-rm is going to remove the file.
> I only need to remove it from the commit.

Actually 'git rm' is exactly what you want to use.  It will /stage/
the removal of the file, and then you can use 'git commit --amend'.
Like this:

$ git rm *~  # will only work if the files are in the file system, if
not you need to mention each file explicitly
$ git commit --amend  # you might also want to have a look at the -c
and -C flags for commit

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe               http://therning.org/magnus

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to