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

Re: GIT counterpart to "svn list"

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 22, 2010, 07:41 UTC
Message-ID
<4BCFFDC7.4050205@drmicha.warpmail.net>
In-Reply-To
<20100421223716.6526f625@pennie-farthing>
Jack Desert venit, vidit, dixit 22.04.2010 05:37:
Show 15 quoted lines
> El Thu, 22 Apr 2010 05:24:48 +0200
> Tomas Carnecky <tom@dbservice.com> escribió:
>> On 4/22/10 5:22 AM, Jack Desert wrote:
>>>
>>> I'm new to GIT, and the one command I can't live without is:
>>>    svn list
>>> Is ther a GIT couterpart to svn list?
>>
>> We're all clueless about how svn works, or what svn list does. Can you 
>> enlighten us please?
>>
>> tom
>>
>  
> "svn list" displays which files and folders in the current directory are under version control. It's helpful in figuring out which files you still need to add to the repository. Attached is sample output from one of my directories under subversion souce control.

Now, that statement is about as true as Tomas' about "all" people's svn-cluelessness here ;)

svn list [URL[@REV]] lists the files and directories of the repo URL at revision rev, rev defaulting to the head revision, URL defaulting to the repo URL of ".".

So, even without URL, it does not look at the files and folders of the current directory at all (besides .svn to find the repo URL). In particular, it does not tell you anything about untracked files and is (by itself) useless for figuring out what to add. svn status is used for that. Instead, svn list tells you which files and folders are under version control at "." in the repo, but not limited to the the contents of your cwd.

git ls-files does what svn list (without URL) does, and more. But git status [-s] may be what you are really looking for, if you're interested in tracked versus untracked files.

Now, svn list URL is something that git does not really do, because it tries to do as much as possible locally, not on the server side. But that is not the svn list incantation you asked about ;)

Cheers, Michael

Previous: Tomas CarneckyNext: Alex Riesen
Message 6 of 9 in “GIT counterpart to "svn list"”
  1. Jack DesertApr 22, 2010
  2. Tomas CarneckyApr 22, 2010
  3. Jack DesertApr 22, 2010
  4. Alexander IljinApr 22, 2010
  5. Tomas CarneckyApr 22, 2010
  6. Michael J GruberApr 22, 2010
  7. Alex RiesenApr 22, 2010
  8. Santi BéjarApr 22, 2010
  9. Git - SVN Crash CoursePetr Baudis, Apr 22, 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.