如何远程运行git命令? [英] How to run git command remotely?

查看:132
本文介绍了如何远程运行git命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在远程计算机上运行git命令?我想在远程计算机上运行 git show git log 。如何运行与颠覆类似的命令?你的解决方案是什么?
更新:
例如我有一台服务器可以通过ssh或http协议连接到它,并且我的源代码保存在该服务器上。我想通过git命令以编程方式访问以编程方式更改设置细节,而无需克隆。 解决方案

如果您从字面上想要运行命令远程执行SSH:

  ssh username @ hostcd my / repo / path&&&git show


How to run git command on remote computer? I want to run git show or git log on remote computer. how to run command similar to subversion? what is your solution? Update: For example I have a server that can connect to it by ssh or over http protocol and my source code saved on that server. I want to access to change set detail programmatically by ruby via git command without cloning.

解决方案

If you literally want to run the command remotely, do it over SSH:

ssh username@host "cd my/repo/path && git show"

这篇关于如何远程运行git命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆