简体   繁体   中英

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-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 (ie apparently empty):

在此处输入图像描述

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.

获取

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 克隆

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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