Re: [git-users] Just getting started
-m "initial commit" works with cmd.exe powershell, git bash and linux which is why I suggested it. As I do not have access to a mac I am unable to say if it will work on a mac or not. Considering the origins of darwin I believe it will work on mac as well. On Sat, Jul 15, 2023 at 12:13 AM Tassilo Horn wrote: > Chris Stone writes: > > Hi Chris, > > > I have always used double quotes for commit msgs. git commit -m > > "message here" I also believe that is the expected format when using > > -m > > That's not git's responsibility. -m wants gets a single argument but > what that is depends on how your shell interprets what you've typed in > on the command line. That said, -m "initial commit" might be the right > string quoting for cmd.exe. With typical unix/posix shells, usually any > of > > -m "initial commit" > -m 'initial commit' > -m initial\ commit > > will ensure that "initial commit" is interpreted as a single argument > instead of two. > > Bye, > Tassilo > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/git-users/878rbhpurv.fsf%40gnu.org. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/CAEHZf3Zozg3UHz-Lw6fwNvMXUuunpX8GgrvSWp4X_tdt8RTEfQ%40mail.gmail.com.
Re: [git-users] Just getting started
Chris Stone writes: Hi Chris, > I have always used double quotes for commit msgs. git commit -m > "message here" I also believe that is the expected format when using > -m That's not git's responsibility. -m wants gets a single argument but what that is depends on how your shell interprets what you've typed in on the command line. That said, -m "initial commit" might be the right string quoting for cmd.exe. With typical unix/posix shells, usually any of -m "initial commit" -m 'initial commit' -m initial\ commit will ensure that "initial commit" is interpreted as a single argument instead of two. Bye, Tassilo -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/878rbhpurv.fsf%40gnu.org.
Re: [git-users] Just getting started
I have always used double quotes for commit msgs. git commit -m "message here" I also believe that is the expected format when using -m On Fri, Jul 14, 2023 at 8:50 AM Tassilo Horn wrote: > David Aldrich writes: > > Hi David, > > > I am at the absolute beginning of learning git. Using git on Windows. > > I have done: > > > >>git init > >>git add *.cpp > >>git status > > On branch master > > > > No commits yet > > > > Changes to be committed: > > (use "git rm --cached ..." to unstage) > > new file: file_A.cpp > > new file: file_B.cpp > > > >>git commit -m 'initial files' > > error: pathspec 'files'' did not match any file(s) known to git > > > > Why is this failing? > > What shell are you using? The above error suggests that the quoted > string 'initial files' is interpreted as two arguments 'initial and > files'. > > IIRC, Git for windows comes with git-bash which is a proper unix shell > which probably also has completion for git commands. In case you have > to stick to the shell you are using right now, you need to figure out > how to properly quote strings containing spaces... > > Bye, > Tassilo > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/git-users/87ilamzgvx.fsf%40gnu.org. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/CAEHZf3Ytf1WgQOnyTvu19w645GsSGqv7zMwoiVs9TXKSaNsyvQ%40mail.gmail.com.
Re: [git-users] Just getting started
Hi Tassilo I was using Windows command prompt. Using git-bash instead fixed the problem. Thank you. BR David On Friday, July 14, 2023 at 3:50:54 PM UTC+1 Tassilo Horn wrote: > David Aldrich writes: > > Hi David, > > > I am at the absolute beginning of learning git. Using git on Windows. > > I have done: > > > >>git init > >>git add *.cpp > >>git status > > On branch master > > > > No commits yet > > > > Changes to be committed: > > (use "git rm --cached ..." to unstage) > > new file: file_A.cpp > > new file: file_B.cpp > > > >>git commit -m 'initial files' > > error: pathspec 'files'' did not match any file(s) known to git > > > > Why is this failing? > > What shell are you using? The above error suggests that the quoted > string 'initial files' is interpreted as two arguments 'initial and > files'. > > IIRC, Git for windows comes with git-bash which is a proper unix shell > which probably also has completion for git commands. In case you have > to stick to the shell you are using right now, you need to figure out > how to properly quote strings containing spaces... > > Bye, > Tassilo > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/50b7da67-d354-4b20-a614-3177e9c9b60fn%40googlegroups.com.
Re: [git-users] Just getting started
David Aldrich writes: Hi David, > I am at the absolute beginning of learning git. Using git on Windows. > I have done: > >>git init >>git add *.cpp >>git status > On branch master > > No commits yet > > Changes to be committed: > (use "git rm --cached ..." to unstage) > new file: file_A.cpp > new file: file_B.cpp > >>git commit -m 'initial files' > error: pathspec 'files'' did not match any file(s) known to git > > Why is this failing? What shell are you using? The above error suggests that the quoted string 'initial files' is interpreted as two arguments 'initial and files'. IIRC, Git for windows comes with git-bash which is a proper unix shell which probably also has completion for git commands. In case you have to stick to the shell you are using right now, you need to figure out how to properly quote strings containing spaces... Bye, Tassilo -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87ilamzgvx.fsf%40gnu.org.