Here's a git repository on github:
git://github.com/Fudge/gltail.git
What's the simplest way to check out a read-only copy using the git command line tool?
update: Here's a suggestion to the githubbers: Do something similar to google code, which automatically displays a message such as:
Use this command to anonymously check out the latest project source code:
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://orapig.googlecode.com/svn/trunk/ orapig-read-only
update: The githubbers have done this.
The git clone command copies an existing Git repository.
Git Fetch is the command that tells the local repository that there are changes available in the remote repository without bringing the changes into the local repository. Git Pull on the other hand brings the copy of the remote directory changes into the local repository.
git clone git://github.com/Fudge/gltail.git
The question is a bit misleading. There's not really such a thing as a "read-only copy" of a git
repository. You can clone an existing repository with:
git clone git://example.com/path/to/repo.git
But unlike Subversion, every "copy" in git is itself a completely new repository. Since you can commit to your own repository, it's certainly not read-only in that sense.
I didn't found a real "read-only copy", but you can approach it by this way depending on your need :
1) git clone --depth 1 git://github.com/Fudge/gltail.git
Explanation : as you ask for a copy, you may not be interested by the full history of that copy.--depth 1
option limits the download to the last version of the default branch and may reduce dramatically the amount of data to retrieve.
2) If you don't want to update your copy, you can remove the .git directory at the root of your copy : it will cut the link with the original repository.
Otherwise, if your need is to be sure that you never modify the original repo, it must be managed by your access rights on this original repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With