当我从Visual Studio Team Services(Visual Studio Online)帐户克隆存储库时,我在克隆过程中在控制台中获取了一条消息:
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.
Run Code Online (Sandbox Code Playgroud)
我想在我的git服务器上做类似的事情.如何在克隆时发送要打印的消息?
没有可以使用的钩子,但如果使用,ssh
可以使用以下代码将横幅打印到 stderr:
cat 1>&2 << "banner"
remote: _ _ _ _ __ __ _ _
remote: | | | | ___| | | ___ \ \ / /__ _ __| | __| |
remote: | |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
remote: | _ | __/ | | (_) | \ V V / (_) | | | | (_| |
remote: |_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|
banner
Run Code Online (Sandbox Code Playgroud)
以下文件之一取决于您的 ssh 使用情况:
/etc/sshrc
~/.ssh/rc
归档时间: |
|
查看次数: |
99 次 |
最近记录: |