git GitHub for Windows 可以在本地使用吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12225792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can GitHub for Windows be used locally?
提问by user850010
I decided that I need some sort of Revision Control Software for my coding purposes, so I installed GitHub for Windows.
我决定需要某种版本控制软件来进行编码,所以我安装了 GitHub for Windows。
Problem is after I add a repository, copy source code in that folder and then click on commit it wants to commit to GitHub web site and is asking me to provide name and email.
问题是在我添加存储库后,复制该文件夹中的源代码,然后单击提交,它想提交到 GitHub 网站,并要求我提供姓名和电子邮件。
Since my intention for using git is only to have revision control for myself and not to collaborate with other developers, I want to host repositories locally on my computer.
由于我使用 git 的目的只是为了自己进行版本控制,而不是与其他开发人员协作,因此我想在我的计算机上本地托管存储库。
Is hosting locally possible and can I do it with GitHub for Windows?
是否可以在本地托管,我可以使用 GitHub for Windows 进行托管吗?
采纳答案by hjweide
I am using GitHub for Windows locally, so yes, it is possible. However, if you want to push your code you will have to push it to the GitHub website.
我在本地使用 GitHub for Windows,所以是的,这是可能的。但是,如果您想推送代码,则必须将其推送到 GitHub 网站。
What I do is to have my repository on a Dropboxaccount, so that it is still online, but also private. (As opposed to free GitHub accounts that make your code public). If you are working on your code alone, this should be fine for you, if you just commit to the "local" Dropbox repository.
我所做的是将我的存储库放在一个Dropbox帐户上,这样它仍然在线,但也是私密的。(与使您的代码公开的免费 GitHub 帐户相反)。如果您单独处理您的代码,如果您只是提交到“本地”Dropbox 存储库,这对您来说应该没问题。
Also see this question, which helped me when I started this process.
另请参阅此问题,它在我开始此过程时对我有所帮助。
回答by VonC
Another option when using git locally (so no"GitHub for Windows"), while wanting to benefit from some of the GitHub features (wiki, administration, browsing, ...), is to install GitLab.
Sure it can be used by several people, which is not your case, but it also great for solo development.
在本地使用 git 时(因此没有“Windows 版 GitHub”)的另一个选择,同时希望从一些 GitHub 功能(wiki、管理、浏览等)中受益,是安装GitLab。
当然它可以被几个人使用,这不是你的情况,但它也非常适合单独开发。
You can even record your issueson it:
你甚至可以在上面记录你的问题:
回答by ronalchn
If you only want it local, you don't want to use GitHub.
如果你只想要本地的,你不想使用 GitHub。
You want to use git only.
您只想使用 git。
Get msysgit, found at code.google.com/p/msysgit/.
获取 msysgit,可在 code.google.com/p/msysgit/ 上找到。
Of course, it means that only git features are available, and github features are not.
当然,这意味着只有 git 特性可用,而 github 特性不可用。
Note: all github features are found on the github website, and apart from the social features (issue tracker, wiki), includes the graphs of commit activity, code size increases/decreases, network graph.
注意:所有 github 功能都可以在 github 网站上找到,除了社交功能(问题跟踪器、wiki),还包括提交活动图、代码大小增加/减少、网络图。
Having said that, substitutes for the network graph on GitHub include gitk, and others.
话虽如此,GitHub 上网络图的替代品包括 gitk 等。
回答by JohnB
Answer: You may want to try TortoiseGitand work with local repositories. In git, you can create a "bare" repository as your main repository locally in an empty folder. This is very easy with TortoiseGit (context menu item).
答:您可能想尝试TortoiseGit并使用本地存储库。在 git 中,您可以在本地的空文件夹中创建一个“裸”存储库作为您的主存储库。TortoiseGit(上下文菜单项)很容易做到这一点。
(Comment: I think you are confusing GitHub [the service] with git [the application].)
(评论:我认为您将 GitHub [服务] 与 git [应用程序] 混淆了。)