Source code for all tutorials and assignments will be made available in various repositories on GitHub. To download source code you will use Git to clone repositories to your Department Linux user account or to your private computer.
Open a terminal, type
git --version and press enter.
$ git --version
git is installed you will something similar to this as a result in the
git version 1.9.1
git is not installed you will something similar to this as a result in the
$ git: command not found
git is not installed on your system, install
git by following
On the following web page you find an example GitHub repository.
The repository contains the folder
sub and the files
sub folder contains a single file named
By clicking on a file, for example the
one.txt file, you will see the content of the file.
A small text file.
Click on the green button named Clone or download. Now a small pop-up will appear showing the repository URL. To copy the repository URL click on copy-to-clipboard icon to the right of the URL.
From the terminal, navigate to a directory where you want the cloned directory
to be created. To clone the example repository, type
git followed by a space and paste the repository URL.
$ git clone https://github.com/uu-dsp-os-ospp-2020/module-0-example-repository.git
Press enter to execute the command. Now you should see something similar to this written to the terminal.
Cloning into 'module-0-example-repository'...
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 14 (delta 1), reused 14 (delta 1), pack-reused 0
Unpacking objects: 100% (14/14), done.
Checking connectivity... done.
Note the first line
Cloning into 'module-0-example-repository'.... This tell
you that the cloned repository is found in the newly created directory
within the current working directory.
To get an overview of the cloned repository, use the
$ tree module-0-example-repository
tree command will print out a tree view showing all files and folders in
│ └── three.txt
1 directory, 4 files
From the above we see that in the
module-0-example-repository we find the files
two.txt. In the same directory we also find a sub
sub. Within the
sub directory we find a single file named