简体   繁体   English

在Windows服务器上设置Git

[英]setting up Git on a Windows server

I have a mac (runs OS X Lion), when I create XCode projects, there is an option to create a local git repository on the same machine, however, after I created a test XCode project (with its local git repository), I want XCode to push/pull changes not from GitHub, but from a Windows server (located at our local network, IP address: 10.3.3.12). 我有一台Mac(运行OS X Lion),当我创建XCode项目时,可以选择在同一台计算机上创建本地git存储库,但是,在创建测试XCode项目(及其本地git存储库)后,我希望XCode不是从GitHub,而是从Windows服务器(位于我们的本地网络,IP地址:10.3.3.12)推/拉更改。 how can I set Git on this server ? 如何在此服务器上设置Git?

ps I have found many tutorials, but they sound to be outdated and hard to follow, like this one . ps我发现了很多教程,但是听起来像这样 ,它们已经过时且难以遵循。

You can setup an Apache server with Smart HTTP configured to serve your Git repo - http://progit.org/2010/03/04/smart-http.html 您可以使用配置的Smart HTTP设置Apache服务器来为您的Git存储库提供服务-http: //progit.org/2010/03/04/smart-http.html

Smart HTTP is what I have found to be the easiest way for setting a Windows Git server, to be used from Mac OS X. 我发现智能HTTP是设置Mac OS X中使用的设置Windows Git服务器的最简单方法。

After you setup the server, it is easier to clone the repository, and then create the xcode project in that repository. 设置服务器后,可以更轻松地克隆存储库,然后在该存储库中创建xcode项目。 XCode will use the repository correctly if you start the project in the same folder that you cloned. 如果您在克隆的同一文件夹中启动项目,则XCode将正确使用存储库。

git clone username@yourlocal-repos:repo.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM