Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git clone verbose output?

I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on.

However, when Git is started from the Dockerfile, I see no git clone output whatsoever. The only thing printed to console is:

Cloning into '/root/lib/opencv'... POST git-upload-pack (gzip 2052 to 1062 bytes) 

and then just a silence. While, usually, I expect something like this:

Cloning into 'opencv'... POST git-upload-pack (gzip 2040 to 1052 bytes) remote: Counting objects: 158365, done. Receiving objects:   8% (12670/158365), 2.32 MiB | 255.00 KiB/s ... and so on ... 

How to enable git verbose output in docker build? Maybe I have to start some interactive mode?

like image 876
Aleksei Petrenko Avatar asked Sep 26 '14 09:09

Aleksei Petrenko


People also ask

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.

Why git clone is not working?

If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.

What does git clone -- mirror do?

A clone copies the refs from the remote and stuffs them into a subdirectory named 'these are the refs that the remote has'. A mirror copies the refs from the remote and puts them into its own top level - it replaces its own refs with those of the remote.


1 Answers

As far as I undestand it's not the issue of the Docker, but issue of the git. By default git shows progress if you are in an interactive console. If you are not you could specify additional paremeters to git clone to output progress to stdout:

git clone --progress --verbose ..... 
like image 167
Sergey P. aka azure Avatar answered Sep 21 '22 02:09

Sergey P. aka azure