top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to clone a repository from gitweb?

+1 vote
1,186 views

I am new to git. I have followed the instructions given at https://git-scm.com/book/en/v2/Git-on-the-Server-GitWeb and successfully installed gitweb. I am using git 2.2.2 and it is installed on Linux.

After the successful installation and configuration of gitweb, I could able to see my git repositories when I hit my url like... http://ipaddress ( and I could see all the git projects/repositories listed here)

Now, I would like to my team members to clone these repositories to their local machines (all windows) using either git bash or tortoise git. However, we are unable to find or get the git clone url for these projects which are on gitweb.

How can I achieve this. Please help.

For your information, there are 5 git repositories on my Linux box (in which same git and gitweb are installed) and they are present under /root/git_projects/

posted Sep 25, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

AFAIU gitweb is only a viewer for git repos. You'll need to set up either ssh access och configure your web server to serve the git repos (using git-http-backend).

answer Sep 25, 2015 by Tarun Singhal
Similar Questions
+3 votes

When we clone a remote GIT repository, all folders/files will be cloned. This will consume lot of disk space in our local machine.
Is there a way to clone only few folders & exclude others?

This is possible in clearcase snapshot view by changing load rules.

+1 vote

There's a challenge that i'm currently facing after migration from WINCVS to GIT. The problem here is I need to pull/fetch a specific branch (and NOT clone the entire repository) from the repository to a particular location on the AIX server.

Earlier while using WINCVS this functionality was achievable using JCVSExport package as we could just checkout a particular branch and fetch the package on to the server location.
WINCVS Command : java JCVSExport -h cvs.xyz.com -u abcde -p xxxxxx -d /abcd/cvs/testing -c "$REPOSITORY" -m "$PACKAGE"

I am not able to achieve the same functionality using GIT. I DO NOT want to clone the entire repository on the AIX server instead I just want to fetch/pull a specific branch contents on the server. Can someone please help me out with the solution or any possible way with which I can achieve the same functionality.

+2 votes

I've been trying to figure out why I can't push from a shallow clone (using --depth) to a repository. I've made simple examples where it works, but I've read that in doesn't work in every case. However, I can't come up with a case where it doesn't work. Googling gives this answer: http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone,

but I don't completely understand the explanation,Please explain.

+1 vote

At some point I added a large file into a git repository. It now exists on multiple branches, possibly with some changes to it. I'd like to remove it from git, but leave its current form (say the one on the master branch) on the file system.

I tried (on a dummy git archive)

git filter-branch --index-filter 'git rm --cached --ignore-unmatch bigfile' master branch1 branch2

That, however, does not leave a copy of bigfile on the file system.It isn't clear to me why not, though the description of the --tree-filteroption to filter-branch (I'm using the --index-filter option, but is is "similar") states:" (new files are auto-added, disappeared files are auto-removed ... )".
Is there a direct way to do what I want, with git? I've found similar requests;none of the responses point out that the above command actually deletes the file from the file system.

+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

...