1

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.

Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
  • possible duplicate of [How to setup github repository in my NetBeans IDE?](http://stackoverflow.com/questions/8456032/how-to-setup-github-repository-in-my-netbeans-ide) – Nekto Nov 12 '12 at 11:18

2 Answers2

3

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

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Wonderful answer, thank you. Does "check out" mean the same as it does with source safe? That is: Stopping other developers from committing changes? – Chuck Le Butt Jul 24 '11 at 00:28
  • 1
    @Django: no, there is no locking mechanism (since there is no "central repo", as mentioned in http://serverfault.com/questions/284136/how-do-i-make-a-bash-script-for-git-checkin-checkout/284187#284187). For more differences between DVCS and CVCS, read http://stackoverflow.com/questions/645008/what-are-the-basic-clearcase-concepts-every-developer-should-know/645771#645771 and http://stackoverflow.com/questions/2704996/describe-your-workflow-of-using-version-control-vcs-or-dvcs – VonC Jul 24 '11 at 00:42
0

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

Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289