Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: show message when cloning

When I clone a repository from my Visual Studio Team Services (was Visual Studio Online) account I obtain a message in the console during cloning itself:

Cloning into 'thirdparty/boost'...
remote:
remote:                    vSTs
remote:                  vSTSVSTSv
remote:                vSTSVSTSVST
remote: VSTS         vSTSVSTSVSTSV
remote: VSTSVS     vSTSVSTSV STSVS
remote: VSTSVSTSvsTSVSTSVS   TSVST
remote: VS  tSVSTSVSTSv      STSVS
remote: VS   tSVSTSVST       SVSTS
remote: VS tSVSTSVSTSVSts    VSTSV
remote: VSTSVST    SVSTSVSTs VSTSV
remote: VSTSv        STSVSTSVSTSVS
remote:                VSTSVSTSVST
remote:                  VSTSVSTs
remote:                    VSTs    (TM)
remote:
remote:  Microsoft (R) Visual Studio (R) Team Services
remote:
Receiving objects: 100% (13740/13740), 736.66 MiB | 278.00 KiB/s, done.

I'd like to do a similar thing in my git server. How can I send a message to be printed when cloning?

like image 741
Jepessen Avatar asked Jul 10 '16 07:07

Jepessen


1 Answers

There is no some hook that you can use, but in case you use ssh you can print the banner to stderr using this code:

cat 1>&2 << "banner"
remote:  _   _      _ _        __        __         _     _
remote: | | | | ___| | | ___   \ \      / /__  _ __| | __| |
remote: | |_| |/ _ \ | |/ _ \   \ \ /\ / / _ \| '__| |/ _` |
remote: |  _  |  __/ | | (_) |   \ V  V / (_) | |  | | (_| |
remote: |_| |_|\___|_|_|\___/     \_/\_/ \___/|_|  |_|\__,_|
banner

in one of the following files depends on your ssh usage:

  • /etc/sshrc
  • ~/.ssh/rc
like image 192
Yuri G. Avatar answered Oct 01 '22 05:10

Yuri G.