Re: Git commit won't add an untracked file given on the command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Tuesday 18 November 2008 22:12:37 Mark Burton, vous avez écrit :
> Hi,
>
> When I try:
>
> git commit -m "New file." .gitignore
>
> Where .gitignore is not yet tracked, I get:
>
> error: pathspec '.gitignore' did not match any file(s) known to git.
>
> Is that result by design, sloth or bug (or me being stupid)?
>

You must "git add .gitignore" first. And yes, this is by design.

You could also have done git commit -a -m "themessage".

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@xxxxxxxxxxxx
40 avenue Raymond Poincaré
75116 Paris
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux