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

Command line hint of the day

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 14, 2005, 18:58 UTC
Message-ID
<Pine.LNX.4.64.0511141049410.3263@g5.osdl.org>

So I got a question about ppp in the kernel, and quite frankly, the things I know about ppp can be engraved with a jack-hammer on a grain of rice.

So what did I do?
	git whatchanged $(git-ls-files *ppp*)

actually does something useful. It will only look at files that are _currently_ called *ppp*, so you'd not see files that have been deleted, but it does the right thing for what I wanted.

You can also do "git log" or "gitk" instead of "git whatchanged", but the whatchanged thing has the advantage that it can run incrementally. Doing a "git log" ends up figuring out _all_ the commits before it can display them, since it also does the densification etc.

Maybe we should have a git man-page section of "strange but useful examples"? Things people do just because they are useful, but may not be immediately obvious to somebody who comes from CVS-land and uses git as just another old SCM?

		Linus
Next: Andreas Ericsson
Message 1 of 2 in “Command line hint of the day”
  1. Linus TorvaldsNov 14, 2005
  2. Andreas EricssonNov 14, 2005

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.