On Thursday 30 April 2009 15:30:52 Denys Vlasenko wrote: > On Thursday 30 April 2009 21:06, Mike Frysinger wrote: > > to commit files: > > git commit -s -m 'my commit log' file1 file2 file3 ... > > Aha, this extra step creates local... change? or however it is called > in git land. Does every "git commit" creates new change? > What if I want to combine a few edits and a few adds > into one local change?
it used to be called the "index", but newer documents are using the phrase "staging area" since the previous naming is pretty obscure/confusing `git add` will move things into the staging area, and it (like git in general) works with changes, not just new files, so you can "add" modified files as well. `git commit` without any files will commit the staging area to the repo, not any thing else you may have modified. if you do specify a few files, you'll bypassing the staging area and only commit what you specified. > > the biggest thing to keep in mind with committing is the way git formats > > messages. since it is geared towards easy e-mail interaction, the first > > line in the commit message is the subject followed by a blank line > > followed by the commit body. we should start enforcing proper changelogs > > now in terms of real explanation and full sentences and signed off tags > > and all that jive. example commit message: > > ================== > > blah blah short summary suitable for subject > > > > some full explanation here nicely wrapped to 78cols > > ====== > > Hmm, it did not drop me into an editor, so I had no chance > to enter description formatted like this. > > I assume I need to drop -m 'my commit log' part to be able > to do that interactively? you can add '-e' to explicitly edit. that's usually what i do: specify the short summary with -m but then include -e to edit the full text. whichever is easier for you of course. once you made a commit, you can amend the most recent one with --amend ... that means you can add files/changes or update the changelog. of course, you should never amend a commit that has been pushed out into the public repo. -mike _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
