问题描述:

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):

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.

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.

相关阅读:
Top