加密git远程使用 [英] Groking git remote usage

查看:186
本文介绍了加密git远程使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在自己的机器上用git玩了6个月,并且非常喜欢它。然而,我发现很难真的很高兴我将如何在团队/企业环境中使用它。 (我想知道 Eric Sink 是否正确)。



我开始尝试在Windows上安装git服务器,但是不太好



所以我想知道在我自己的机器上建立第二个存储库并开始在这种情况下,你需要坚持不懈的努力。



你知道任何有关如何开始简单的优秀文章,或者你有任何提示

解决方案

如果:
$ b


  • 您的主计算机可通过共享路径访问(\myMainComputer\\\MySharedDirectory)

  • 或者您在同一台计算机上有多个回购站



你可以:


  • git clone --bare / path /到/你/首/ REP

  • cd / path / to / your / first / repo

  • git remote add bare_repo / path / to / bare / rep

  • (work,commitits)

  • git push bare_repo

  • (如果其他人也推送到裸露的回购)
  • git pull bare_repo



换句话说, protocole支持作为远程回购的合法URL。

请参阅 $ b


>对于本地存储库,本地也支持git,可以使用以下语法:



  /path/to/repo.git/ 
file:///path/to/repo.git/


I've been 'playing' with git on my own machine for 6 months now, and really loving it.

However, I'm finding it difficult to really grok how I would use it in a team/enterprisey environment. (I'm wondering whether Eric Sink is right).

I started out trying to install a git server on windows, but that didn't go too well.

So I wondered about just setting up a second repository on my own machine and starting to get a hang on pulling/pushing to that.

Do you know of any good articles for starting 'simple' like that, or do you have any tips on grokking the next level?

解决方案

If:

  • your main computer is accessible through a shared path (\myMainComputer\MySharedDirectory)
  • or you have several repo on the same computer

You simply can:

  • git clone --bare /path/to/your/first/repo
  • cd /path/to/your/first/repo
  • git remote add bare_repo /path/to/bare/rep
  • (work, commits)
  • git push bare_repo
  • (if other have pushed to bare repo as well)
  • git pull bare_repo

In other words, the file protocole is supported as a legitimate URL for remote repos.
See git fetch, section URL:

For local repositories, also supported by git natively, the following syntaxes may be used:

/path/to/repo.git/
file:///path/to/repo.git/

这篇关于加密git远程使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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