I am trying to clone a git repository into my local using the following code .
repo = Git.cloneRepository().setCloneAllBranches(true).setCredentialsProvider(new UsernamePasswordCredentialsProvider(userName, pwd)).setURI(uri).setDirectory(new File(toDir)).call()
But I am unable to see .git/refs/remotes folder in my local , though I am able to see .git/refs/heads how do I confirm that it indeed clones all the branches .
I am also trying to print all my local branches using
Git git = Git.open(new File(toDir));
List<Ref> branches = git.branchList().call();
System.out.println("Local branches:");
for (Ref branch : branches) {
System.out.println(branch.getName());
}
With this also I am not able to see other branches being cloned .
I believe there should be .git/refs/remotes/origin folder with all my branches .
I believe there should be .git/refs/remotes/origin folder with all my branches .
Shivansh Kaldaik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.