Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git clone verbose mode – show each incoming object

Tags:

git

verbose

I’m wondering that git clone --verbose is not very verbose. The output of executing the command is the following:

$ git clone --verbose <repo> remote: Counting objects: 184, done remote: Finding sources: 100% (184/184) remote: Total 184 (delta 66), reused 183 (delta 66) Receiving objects: 100% (184/184), 18.90 KiB, done. Resolving deltas: 100% (66/66), done.  

The expected behaviour is to see the list of the received objects one by one. Is that possible using some other options?

like image 471
erkfel Avatar asked Jul 11 '13 17:07

erkfel


People also ask

What does git clone -- mirror do?

git clone --mirror In addition, --mirror will clone all the extended refs of the remote repository, and maintain remote branch tracking configuration. You can then run git remote update on the mirror and it will overwrite all refs from the origin repo. Giving you exact 'mirrored' functionality.

Does git clone Get all branches?

The idea is to use the git-clone to clone the repository. This will automatically fetch all the branches and tags in the cloned repository. To check out the specific branch, you can use the git-checkout command to create a local tracking branch.

What is verbose in git?

Today I want to talk about a little-know flag for the git commit command that I think will help you create better commits: -v , also known as --verbose . Use this flag and Git will include the diff of the changes at the bottom of the commit message template: I think this is helpful for a couple of reasons.

Does git clone get all tags?

List Git Tags. When you clone a repository, all the tags associated with the repository will be pulled down.


2 Answers

I accept @Lekensteyn answer.

If you want to trace git remote commands,add following environmental variables into your terminal.This helps you to peek into what is running behind the scenes of a git command.

export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1 

Reference:https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables

Sample Cloning Result after exportenter image description here

enter image description here

enter image description here enter image description here

like image 181
Nayagam Avatar answered Oct 05 '22 19:10

Nayagam


It is not possible to list objects (files, commits, blobs, whatever) one-by-one, simply because git packs them in a single file for efficiency reasons. For the same reason, you will only see a hidden .git folder while cloning, files will be created only if the full pack file has been downloaded.

If you are wondering, these pack files will be downloaded to .git/objects/pack/ with a name like tmp_pack_XXXXXX. (later on, it will be renamed to something like pack-*.pack with a related pack-*.idx file)

like image 40
Lekensteyn Avatar answered Oct 05 '22 19:10

Lekensteyn