On Wed, 4 Dec 2013 09:27:36 -0600 tripatjeet singh <tripatli...@gmail.com> wrote:
> Once again it gives me below error. Here 'testing' is the GIT > repository and 'Branch_Test1' is a folder under testing. ^^^ Supposedly this is the root cause of these errors: Git is not Subversion or CVS and it does not have any notion of "directories" (or "folders", if you want it names this way) when it comes to cloning. Recording directory names in commit is a byproduct of the fact Git works on systems with filesystems sporting the now-typical hierarchical approach to organizing files. Contrary to Subversion, which for some reason decided to mix filesystem pathnames with revisions, in Git these concepts are completely orthogonal: in Git, a branch is a line of chained commits each representing *the whole state* of the project, that is, a branch (or a tag) is clearly a line of history, not something else. You really should read some introductory material on how this stuff is done in Git; all your prior knowledge of CVS or Subversion is likely to hinder you, not get you going with a DVCS such as Git. > 'testing' respository is already cloned on the my local machine and > my present working directory is different where i want the files to > be cloned. Well, I don't really know what you wanted to convey with this sentence. If you mean you'd like to avoid re-cloning of an already cloned repository, then Git is able to clone a *local* repository. [...] > *$ git clone --depth 1 --branch Branch_Test1 > ssh://g...@git.ampf.com/testing > <http://g...@git.ampf.com/testing>*Cloning into 'testing'... warning: > Could not find remote branch Branch_Test1 to clone. fatal: Remote > branch Branch_Test1 not found in upstream origin [...] This error message coulnd't be more to the point: there's no branch named "Branch_Test1" in the remote repository Git talked to. Consider either logging into the server, `cd`-ing to the repository's directory and running `git branch` there or doing a "full mirror clone" to check that out. $ git clone --mirror --bare ssh://g...@git.ampf.com/testing foo $ cd foo $ git branch should show you which branches the repository has. It might turn out there's another way to list the branches. For instance, gitweb or another web frontend is typically installed along with gitolite (see below) to view the repositories using the Internet browser. So ask your admins whether they have a thing like that in place. [...] > *$ git clone --depth 1 --branch Branch_Test1 > ssh://g...@git.ampf.com/testing/Branch_Test1 > <http://g...@git.ampf.com/testing/Branch_Test1>*Cloning into > 'Branch_Test1'... > FATAL: R any testing/Branch_Test1 tsingh2 DENIED by fallthru > (or you mis-spelled the reponame) > fatal: Could not read from remote repository. > Please make sure you have the correct access rights > and the repository exists. [...] This means the server has a gitolite Git frontend installed, and this front-end, which is able to control access to the repositories it manages based on SSH keys of their users, denied your user (tsingh2) access to a supposedly non-existing repository "testing/Branch_Test1". This error is triggered because, again, you tried to employ your knowledge of Subversion. In Git, the URL of a repository designates only the repository, branches are a complete orthogonal concept and so they never appear in repository URLs. Hence the first attempt is syntactically correct, just the repository does not contain the branch "Branch_Test1" as already explained. So again, please spend some time and do a basic self-education in Git concepts first. Try playing with a toy repository, *not* your converted repository. Gain grasp on the concepts like branches, tags, remote repositories, remote branches etc. You might start at . P.S. Resending with the group e-mail added back. Please hit the "reply to all" or "reply to group" button in your mail client next time you're replying to a mailing list. 1. http://git-scm.com/documentation -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.