English 中文(简体)
sh 边远存放处的 g木
原标题:git log over ssh remote repository

I want to create a git (web) browser, hence I need to iterate over commits (git log) on remote repository which is on ssh connected machine. My repo is quite big and constantly changing, therefore I will be interested in not fetching changes locally only to git log them.

I have tried with:

git remote add origin ssh://example.net/repo
git checkout -b master --track origin/master

and it failed :

怎么做?

问题回答

You could push the log to the web server using a hook. On the repository host create a script:

repo.git/hook/post-receive

<代码>repo.git 是您的存放途径。 如果有人向该存放处推倒,则将启动 h,并可以丢弃 g木,将其交给网络服务器, over。

解决办法的好处是,任何能够使用网络服务器的人都会立即进入存放处。

On the remote machine, cd to your repository and do a git instaweb. That will start up a web server that you can access which will contain logs and all other things which are generally used. git help instaweb for details.

您可以尝试在 cr子上 run上 g球:

ssh example.net git --git-dir=repo log > /tmp/repo.log

This way you don t need to create local repository copy. This assumes you have ssh keys set up and feel safe with this configuration (someone with access to web server could potentially gain access to the repository).

你引述的指令有误,其原因是,为了建立遥控分行<代码>origin/master,你需要操作<条码>。

Having to fetch to do git log does not always work. - I have a large repo that I rarely update so I only clone when I need to make a change. But I d like to keep up with changes to it. - I just pushed. I d like to double check the remote repo got my change. and I dont have ssh access but do have git access to the machine.

显然:

GIT_DIR=node:/path/to/repo.git git log

应努力开发一套有限的 g木转换器。

它是今天 g中几个漏洞之一,即IMHO。

If you would like to run git log localy you will need to clone the repository (isn t that what you were trying to do?):

git clone example.net/repo

缺点是,它需要空间储存在网络服务器上,但任何未来的拖拉将只下载新的改动,而且可能相当快,将取决于变化的规模:

cd repo
git pull

您可以把<代码>pull<>>>>>> /code 放在表格式中,或者甚至从存放处引开,在需要时使用 h加以更新。





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签