开发者

How do I set up NetBeans 7 to download the contents of a GitHub repository?

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-J开发者_StackOverflow社区ul-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):

How do I set up NetBeans 7 to download the contents of a GitHub repository?

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.


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.

How do I set up NetBeans 7 to download the contents of a GitHub repository?

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.

How do I set up NetBeans 7 to download the contents of a GitHub repository?

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜