Re: [PATCH v2] ls-remote: print URL when no repo is specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On May 16, 2010, at 06:36, Sverre Rabbelier wrote:

> On Sun, May 16, 2010 at 04:14, Geert Bosch <bosch@xxxxxxxxxxx> wrote:
>> What git seems to be missing is a "git info" command, which
>> would print out essentially something like what "svn info" does:
>> name of remote repo that we're tracking, name of current branch,
>> date/author/subject of last commit.
> 
> You can get information about the remote with:
> 
> $ git remote -v

geert-boschs-computer:/tmp%ssh kwai git init --bare /work/bosch/temp.git
Initialized empty Git repository in /export/work/bosch/temp.git/
geert-boschs-computer:/tmp%git init temp
Initialized empty Git repository in /private/tmp/temp/.git/
geert-boschs-computer:/tmp%cd temp
geert-boschs-computer:/tmp/temp%echo hello>world
geert-boschs-computer:/tmp/temp%git add world
geert-boschs-computer:/tmp/temp%git commit -m "Add hello" world
[master (root-commit) 10837b9] Add hello
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 world
geert-boschs-computer:/tmp/temp%git push --all kwai:/work/bosch/temp.git
Counting objects: 3, done.
Writing objects: 100% (3/3), 211 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To kwai:/work/bosch/temp.git
 * [new branch]      master -> master
geert-boschs-computer:/tmp/temp%git push -u --all kwai:/work/bosch/temp.git
Branch master set up to track remote branch master from kwai:/work/bosch/temp.git.
Everything up-to-date
geert-boschs-computer:/tmp/temp%git remote -v
geert-boschs-computer:/tmp/temp%git push
Everything up-to-date

So, there is a remote that gets used automatically by git push and git pull,
but it's not obvious which one. Basically, a "git info" command should give
a dozen lines or so that allows one quickly to identify a repository, including
current branch, any remote it tracks, last commit, wether the working directory
is clean, wether anything is staged for commit, wether the repository tracks
a non-git (svn, bzr, hg) repository.

> 
> And then for the branch etc you can do (although it doesn't list the author):
> 
> $ git branch -v
While both commands are very useful, I think a case can be made for a single
command that pulls together enough information in a few lines that it is clear.

I'll see if I can cobble something up.--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]