Subject: Re: GIT counterpart to "svn list"

From: Michael J Gruber <[email-masked]>
Date: Thu, 22 Apr 2010 09:41:59 +0200

Jack Desert venit, vidit, dixit 22.04.2010 05:37:
> El Thu, 22 Apr 2010 05:24:48 +0200
> Tomas Carnecky <[email-masked]> 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