如何设置 NetBeans 7 以下载 GitHub 存储库的内容?

发布于 2024-11-26 05:25:13 字数 941 浏览 2 评论 0原文

对于我的问题的新颖性表示歉意。我想连接并下载 GitHub 存储库的内容,特别是: https://github.com/residual/残差(存储库 URI 为:https://github.com/residual/residual.git)。

我已经初始化了要创建的存储库的根路径,然后输入 URI,但是当我单击“获取”时,我得到的只是:

==[IDE]== 21-Jul-2011 23:02:51 Connecting
==[IDE]== 21-Jul-2011 23:02:51 Connecting finished.
==[IDE]== 21-Jul-2011 23:05:29 Fetching...
git fetch https://github.com/residual/residual.git +refs/heads/master:refs/remotes/origin/master
No update
==[IDE]== 21-Jul-2011 23:05:30 Fetching... finished.

这听起来很有希望,但在 NetBeans 中,存储库看起来像这样(即显然是空的):

在此处输入图像描述

如何从存储库获取文件(我只想在本地编辑它们,但始终拥有最新版本可用——不提交任何内容)并使用它们在 C++ 项目中?

再次对新问题表示歉意。尽管过去运行 SVN 和 SourceSafe 版本控制没有任何问题,但我似乎找不到任何启动和运行它的指南。

谢谢。

Apologies for the newbishness of my question. I would like to connect and download the contents of a GitHub repository, specifically: https://github.com/residual/residual (with the repository URI being: https://github.com/residual/residual.git).

I have initialized a Root Path for the repository to be created, and then fed in the URI, but when I click Fetch, all I get is:

==[IDE]== 21-Jul-2011 23:02:51 Connecting
==[IDE]== 21-Jul-2011 23:02:51 Connecting finished.
==[IDE]== 21-Jul-2011 23:05:29 Fetching...
git fetch https://github.com/residual/residual.git +refs/heads/master:refs/remotes/origin/master
No update
==[IDE]== 21-Jul-2011 23:05:30 Fetching... finished.

Which sounds promising except in NetBeans the repository looks like this (i.e. apparently empty):

enter image description here

How do I get the files from the repository (I only want to edit them locally, but always have the latest version available -- not commit anything) and use them in a C++ project?

Again, apologies for the newb question. I can't seem to find any guides to getting this up and running, despite having had no problems running SVN and SourceSafe version control in the past.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

﹎☆浅夏丿初晴 2024-12-03 05:25:13

当您“获取”时,您仅填充空 Git 存储库的 refs(引用)的“远程”部分。
换句话说,您不会修改任何本地文件(您现在没有这些文件,因为您的存储库是空的)

Cf。这个 Git 的可视化参考,以便了解 git fetch 如何不修改本地文件。

git fetch

获取后,您需要根据刚刚获取的远程分支之一签出分支。

另一种选择是直接克隆存储库。

git clone

您的本地存储库不会为空,并且会立即在分支上设置(通常默认情况下 <代码>主控)。

When you "fetch", you only populate the "remotes" part of the refs (references) of your empty Git repo.
In other words, you don't modify any of your local files (which you don't have for now, since your repo is empty)

Cf. this visual reference for Git, in order to see how git fetch does not modify the local files.

git fetch

Once fetched, you need to checkout a branch based on one of the remotes branches you have just fetched.

Another option would have been to clone directly the repo.

git clone

Your local repo wouldn't be empty, and would be set up right away on a branch (generally by default master).

难得心□动 2024-12-03 05:25:13

答案很简单:您需要拉取克隆存储库。遗憾的是,目前在 NetBeans 中您无法执行这两项操作。

The answer is simply: You need to pull or clone a repository. Sadly you can presently do neither in NetBeans.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文