threads / discuss / 23561

GIT counterpart to "svn list"

Subject: GIT counterpart to "svn list"

## tl;dr

9 messages between Apr 22, 2010 and Apr 22, 2010.

replies: 8people: 7as markdown or json

Jack Desert· Apr 22, 2010, 03:22 UTC · lore
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?
-Jack
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jack Desert     --    Writer, Entrepeneur
Author and Spokesman: www.LetsEATalready.com
Software Developer:   http://GrooveTask.org
Email: JackDesert556@gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tomas Carnecky· Apr 22, 2010, 03:24 UTC · re: Jack Desert · lore

Re: GIT counterpart to "svn list"

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
Jack Desert· Apr 22, 2010, 03:37 UTC · re: Tomas Carnecky · lore

Re: GIT counterpart to "svn list"

El Thu, 22 Apr 2010 05:24:48 +0200 Tomas Carnecky <tom@dbservice.com> escribió:

Show 11 quoted lines
> 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.
-Jack
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jack Desert     --    Writer, Entrepeneur
Author and Spokesman: www.LetsEATalready.com
Software Developer:   http://GrooveTask.org
Email: JackDesert556@gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alexander Iljin· Apr 22, 2010, 03:45 UTC · re: Jack Desert · lore

Re: GIT counterpart to "svn list"

Hello!

JD> "svn list" displays which files and folders in the current JD> directory are under version control. It's helpful in figuring out JD> which files you still need to add to the repository. Attached is JD> sample output from one of my directories under subversion souce control.

  How about "git status"?
---=====---
 Alexander
Tomas Carnecky· Apr 22, 2010, 03:47 UTC · re: Jack Desert · lore

Re: GIT counterpart to "svn list"

On 4/22/10 5:37 AM, Jack Desert wrote:
> "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.

git ls-files. If you want to find out which files you haven't added to git, use 'git ls-files --other --exclude-standard', but 'git status' is usually much more helpful, and shorter to type.

tom
Michael J Gruber· Apr 22, 2010, 07:41 UTC · re: Jack Desert · lore

Re: GIT counterpart to "svn list"

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

Alex Riesen· Apr 22, 2010, 10:44 UTC · re: Michael J Gruber · lore

Re: GIT counterpart to "svn list"

On Thu, Apr 22, 2010 at 09:41, Michael J Gruber <git@drmicha.warpmail.net> wrote:

> git ls-files does what svn list (without URL) does, and more. But git
> status [-s] may be what you are really looking for, ...

"git status -u" (to show the untracked files). The "-s" is just the short format, which is a nice thing, but not exactly what was asked. These can be combined, of course:

 $ git status -su
  M git.c
 ?? RemoveMe
 $
The untracked files are marked by "??".
Santi Béjar· Apr 22, 2010, 08:56 UTC · re: Jack Desert · lore

Re: GIT counterpart to "svn list"

On Thu, Apr 22, 2010 at 5:22 AM, Jack Desert <jackdesert556@gmail.com> 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?
You could check the Git - SVN Crash Course:
http://git.or.cz/course/svn.html

HTH, Santi

Petr Baudis· Apr 22, 2010, 11:51 UTC · re: Santi Béjar · lore

Git - SVN Crash Course

On Thu, Apr 22, 2010 at 10:56:46AM +0200, Santi Béjar wrote:
Show 9 quoted lines
> On Thu, Apr 22, 2010 at 5:22 AM, Jack Desert <jackdesert556@gmail.com> 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?
> 
> You could check the Git - SVN Crash Course:
> 
> http://git.or.cz/course/svn.html

By the way, it would be nice if someone transferred this to the Git Wiki and went through the text, it was written quite a long while ago. I would then replace the link with a redirect to the wiki, but I don't have the time to edit the course itself personally.

-- 
				Petr "Pasky" Baudis
http://pasky.or.cz/ | "Ars longa, vita brevis." -- Hippocrates

← back to recent threads