Skip to contentSkip to conversation

GIT counterpart to "svn list"

DISCUSSION Jack Desert 7 participants 9 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

Signature · 6 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jack Desert     --    Writer, Entrepeneur
Author and Spokesman: www.LetsEATalready.com
Software Developer:   http://GrooveTask.org
Email: [email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#1 lore raw
Quoted 4 lines · Jack Desert

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

#2 lore raw
Quoted 11 lines · El Thu, 22 Apr 2010 05:24:48 +0200 Tomas Carnecky <[email protected]> escribió:
Quoted 4 lines · Jack Desert

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

Signature · 6 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jack Desert     --    Writer, Entrepeneur
Author and Spokesman: www.LetsEATalready.com
Software Developer:   http://GrooveTask.org
Email: [email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#3 lore raw

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

#4 lore raw
In reply to Jack Desert
Quoted 1 line · Jack Desert

"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

#5 lore raw
In reply to Jack Desert

Jack Desert venit, vidit, dixit 22.04.2010 05:37:

Quoted 8 lines
Quoted 6 lines · El Thu, 22 Apr 2010 05:24:48 +0200 Tomas Carnecky <[email protected]> escribió:
Quoted 4 lines · Jack Desert

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?

Quoted 7 lines
Quoted 5 lines

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

#6 lore raw
Quoted 2 lines · Michael J Gruber

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 "??".

#8 lore raw

Git - SVN Crash Course

Quoted 9 lines · Santi Béjar
Quoted 4 lines · Jack Desert

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.

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