git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Global .git directory

From
GWGerhard Wiesinger <lists@wiesinger.com>
Date
Apr 28, 2010, 20:03 UTC
Message-ID
<alpine.LFD.2.00.1004282148310.26569@bbs.intern>
In-Reply-To
<4BD7D412.5020603@dbservice.com>

-- http://www.wiesinger.com/

On Wed, 28 Apr 2010, Tomas Carnecky wrote:
Show 12 quoted lines
> On 4/28/10 7:33 AM, Gerhard Wiesinger wrote:
>> BTW: The tutorial on http://git-scm.com/ is IHMO wrong:
>> git --version
>> git version 1.6.2.5
>> git commit -m 'Explain what I changed'
>> =>
>> git commit -a -m 'Explain what I changed'
>> => Otherwise changed files are not committed, only added ones.
>> => Therefore that are 2 commit ...
>
> If you mean the snippets right on the front page, it assumes that you add all 
> edited files.

OK, I assumed that the tutorial at http://git.or.cz/course/svn.html when switching from svn to git is correct, but it isn't. I unterstand now, that git is basically a patch management system where you add or remove (rm) files to a patch/commit set (adding in svn means adding or removing a file). So this is very different from svn and other SCM systems.

Homepage: git add (files) => git add (all edited and added files) would clarify this, too.

Show 14 quoted lines
>> BTW2:
>> Why is it necessary to do:
>> # Displays only changed files
>> git diff
>> # Displays only added files
>> git diff --cached
>> 
>> I would like to have a full diff of my changes:
>> git diff -a
>> (or better "git diff -a" should be the default behaviour, I think that's
>> very confusing for new users)
>
> What are 'your' changes? Between HEAD and the working tree (aka. git diff 
> HEAD)?

git diff HEAD # no output.

Ciao, Gerhard

Previous: Tomas CarneckyNext: Alex Riesen
Message 7 of 17 in “Global .git directory”
  1. Gerhard WiesingerApr 27, 2010
  2. Thomas RastApr 27, 2010
  3. Gerhard WiesingerApr 27, 2010
  4. Erik Faye-LundApr 27, 2010
  5. Gerhard WiesingerApr 28, 2010
  6. Tomas CarneckyApr 28, 2010
  7. Gerhard WiesingerApr 28, 2010
  8. Alex RiesenApr 28, 2010
  9. Gerhard WiesingerApr 28, 2010
  10. Erik Faye-LundApr 28, 2010
  11. Gerhard WiesingerApr 28, 2010
  12. Gerhard WiesingerMay 4, 2010
  13. Andrew RuderMay 4, 2010
  14. Andreas EricssonMay 4, 2010
  15. Gerhard WiesingerMay 4, 2010
  16. Junio C HamanoMay 4, 2010
  17. Jacob HelwigApr 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.