I''m trying to learn git. After doing the initial add . I come to a message. Do I add my comment as a comment with # before my line, or what? And how to I get out of there? I''ve been trying to find a good tutorial but I can''t find any that explains this issue, so I get stuck. Are there any good tutorials about git that really explains it without leaving out important parts like this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 16, 2008, at 7:25 AM, Pål Bergström wrote:> > I''m trying to learn git. After doing the initial add . I come to a > message. Do I add my comment as a comment with # before my line, or > what? And how to I get out of there? > > I''ve been trying to find a good tutorial but I can''t find any that > explains this issue, so I get stuck. Are there any good tutorials > about > git that really explains it without leaving out important parts like > this?I''m guessing you typed "git ci" ? If so that will open up whatever editor is defined in the EDITOR environment variable. Write your message (without preceeding #''s) and then save. Or, do it this way: git ci -m "this is my commit message" -philip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Pål Bergström wrote:> I''m trying to learn git. After doing the initial add . I come to a > message. Do I add my comment as a comment with # before my line, or > what? And how to I get out of there? > > I''ve been trying to find a good tutorial but I can''t find any that > explains this issue, so I get stuck. Are there any good tutorials about > git that really explains it without leaving out important parts like > this?The sequence is. # git add <file or directory tree> # git commit -m <comment here> | Insert as first line in message file that editor opens. If this is a local repository then you are done. If cloned from a remote master then you need to follow the local commit with a # git push To see the current status of the local vs. the remote repository # git status To update the local from the remote # git pull peepcode.com has an excellent pdf book on git for $9.00, a great value. They also have a screencast on git ($9.00) as does railscasts.com (free) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve got the same problem as this guy, and these comments aren''t helping. When get prompts me to enter my commit message, it opens an editor, and I for the life of me can''t figure out how to close it. How do I let it know that I''m done with my message? Sorry for the n00b questions. On Nov 16 2008, 2:15 pm, James Byrne <rails-mailing-l...@andreas- s.net> wrote:> Pål Bergström wrote: > > I''m trying to learngit. After doing the initial add . I come to a > > message. Do I add my comment as a comment with # before my line, or > > what? And how to I get out of there? > > > I''ve been trying to find a good tutorial but I can''t find any that > > explains this issue, so I getstuck. Are there any good tutorials about > >gitthat really explains it without leaving out important parts like > > this? > > The sequence is. > > #gitadd <file or directory tree> > #gitcommit -m <comment here> | Insert as first line in message file > that editor opens. > > If this is a local repository then you are done. If cloned from a > remote master then you need to follow the local commit with a > > #gitpush > > To see the current status of the local vs. the remote repository > > #gitstatus > > To update the local from the remote > > #gitpull > > peepcode.com has an excellent pdf book ongitfor $9.00, a great value. > They also have a screencast ongit($9.00) as does railscasts.com (free) > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Close the editor. If you''re using "nano", it''s Ctrl+X. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Thu, Jan 15, 2009 at 4:10 PM, Fiver <evanawitt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''ve got the same problem as this guy, and these comments aren''t > helping. > When get prompts me to enter my commit message, it opens an editor, > and I for the life of me can''t figure out how to close it. > How do I let it know that I''m done with my message? > Sorry for the n00b questions.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jan 15, 2009 at 1:10 PM, Fiver <evanawitt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''ve got the same problem as this guy, and these comments aren''t > helping. > When get prompts me to enter my commit message, it opens an editor, > and I for the life of me can''t figure out how to close it. > How do I let it know that I''m done with my message?What''s your output from git config --get core.editor ? -- Michael C. Libby www.mikelibby.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, just close your editor and it will finish your message. BTW, there is a great git tutorial on peepcode.com, the title is "Git internals", it''s quite big but I really understood git after reading it, unfortunately it''s not free... :( On Thu, Jan 15, 2009 at 6:11 PM, Michael Libby <michael.c.libby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Thu, Jan 15, 2009 at 1:10 PM, Fiver <evanawitt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> I''ve got the same problem as this guy, and these comments aren''t >> helping. >> When get prompts me to enter my commit message, it opens an editor, >> and I for the life of me can''t figure out how to close it. >> How do I let it know that I''m done with my message? > > > What''s your output from > > git config --get core.editor > > ? > > -- > Michael C. Libby > www.mikelibby.com > > > >-- Obrigado, Gustavo Sacomoto Vice-gerente Geral Qype Brasil +55 (11) 76747726 www.qype.com.br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Libby wrote:> On Thu, Jan 15, 2009 at 1:10 PM, Fiver <evanawitt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > What''s your output from > > git config --get core.editor > > ?Nothing. I got the screencast at peepcode, which was very good. I''m more into git now, thanks :-) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you are using vi/Vim ... try pressing Esc and then :qw and hit Enter. That should quit you out of there. On Jan 15, 3:17 pm, Pål Bergström <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Michael Libby wrote: > > On Thu, Jan 15, 2009 at 1:10 PM, Fiver <evanaw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > What''s your output from > > > git config --get core.editor > > > ? > > Nothing. > > I got the screencast at peepcode, which was very good. I''m more into git > now, thanks :-) > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jan 15, 2009 at 3:17 PM, Pål Bergström <rails-mailing-list@andreas-s.net> wrote:> > Michael Libby wrote: >> On Thu, Jan 15, 2009 at 1:10 PM, Fiver <evanawitt@gmail.com> wrote: > >> >> >> What's your output from >> >> git config --get core.editor >> >> ? > > > Nothing.Which means it's time for me to read the documentation myself. :) http://www.kernel.org/pub/software/scm/git/docs/git-commit.html says: "The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order)." So if git config --get core.editor says nothing, then you need to find the value of one of those environment variables to find out which editor you're using. If none of them are set, I have no idea what editor you're getting... but you still need to save your changes to the file and exit the editor. Two probable default editors are nano and vi: Nano exits with ctrl-x (and Y to question about saving changes). vi saves and exits with :wq If you don't need long commit messages you can avoid the editor entirely with: git commit -m "your message here" -Michael -- Michael C. Libby www.mikelibby.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jan 15, 2009 at 4:32 PM, Michael Libby <michael.c.libby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> vi saves and exits with :wqNote: you may need to press ESC first if you are in edit mode. -- Michael C. Libby www.mikelibby.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Libby wrote: e your changes to the file and exit the> editor. > > Two probable default editors are nano and vi: > Nano exits with ctrl-x (and Y to question about saving changes). > vi saves and exits with :wq > > If you don''t need long commit messages you can avoid the editor entirely > with: > git commit -m "your message here"Then it''s vi I have. I learned to do: git commit -a -v -m "message" I understand -a and -m but not 100% on what -v does. I think it has to do what it saves. With -v it only saves changed content. But not sure. Anyway, it works great. So much easier than svn, that I never got into. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jan 15, 2009 at 4:42 PM, Pål Bergström <rails-mailing-list@andreas-s.net> wrote:> Then it's vi I have.You can change that with: git config --global core.editor [your_favorite_editor] or by setting GIT_EDITOR environment variable unless you like vi, that is.> > I learned to do: > > git commit -a -v -m "message" > > I understand -a and -m but not 100% on what -v does. I think it has to > do what it saves. With -v it only saves changed content. But not sure.-v adds a bunch of text to the commit message, specifically a diff of all the exact changes made by this commit. Regards, Michael -- Michael C. Libby www.mikelibby.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---