Debian / Ubuntu Linux: HowTo Download A Git Repository

by on July 18, 2012 · 1 comment· LAST UPDATED July 19, 2012

in

I would like to install something from source code. The site says that I need to download it from git repository. How do I download a git repository under Debian / Ubuntu Linux?

You need to install git and git-core packages under Debian or Ubuntu Linux as follows:
# apt-get install git git-core
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. The syntax is as follows:

 
git clone git://server1.cyberciti.biz/path/to/project
 

In this example I'm going to clone emerald so that I can build it locally:
$ cd ~/buildtests
$ git clone git://anongit.compiz.org/fusion/decorators/emerald

Sample outputs:

Cloning into emerald...
remote: Counting objects: 2272, done.
remote: Compressing objects: 100% (2221/2221), done.
remote: Total 2272 (delta 1622), reused 0 (delta 0)
Receiving objects: 100% (2272/2272), 859.78 KiB | 255 KiB/s, done.
Resolving deltas: 100% (1622/1622), done.

cd into emerald and list the files, enter:
$ cd emerald
$ ls -l

Sample outputs:

total 124
-rw-r--r-- 1 vivek vivek  1903 Jul 18 23:29 AUTHORS
-rwxr-xr-x 1 vivek vivek   261 Jul 18 23:29 autogen.sh
-rw-r--r-- 1 vivek vivek    21 Jul 18 23:29 ChangeLog
-rw-r--r-- 1 vivek vivek  2438 Jul 18 23:29 configure.ac
-rw-r--r-- 1 vivek vivek 18002 Jul 18 23:29 COPYING
drwxr-xr-x 3 vivek vivek  4096 Jul 18 23:29 defaults
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 doc
-rw-r--r-- 1 vivek vivek 15590 Jul 18 23:29 emerald.po
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 engines
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 include
-rw-r--r-- 1 vivek vivek  9498 Jul 18 23:29 INSTALL
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 libengine
-rw-r--r-- 1 vivek vivek   259 Jul 18 23:29 Makefile.am
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 misc
-rw-r--r-- 1 vivek vivek    31 Jul 18 23:29 NEWS
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 pixmaps
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 po
-rw-r--r-- 1 vivek vivek   276 Jul 18 23:29 README
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 src
drwxr-xr-x 2 vivek vivek  4096 Jul 18 23:29 themer
-rw-r--r-- 1 vivek vivek   261 Jul 18 23:29 TODO
-rw-r--r-- 1 vivek vivek    14 Jul 18 23:29 VERSION

You just cloned emerald from from Git to your local machine. You can make modifications and push changes, or just build the software.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Oleg July 27, 2012 at 8:52 am

Useless article whithout describing howto:
>You can make modifications and push changes, or just build the software.
“git clone” already decribed almost on every open source software homepage.

And not «just build», but *properly* for Ubuntu/Debian build and install.

Reply

Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: