4.4.2. Git repository and Python

4.4.2.2. Cloning the Git repository

  1. Clone the existing git repository

    These instructions will clone the git repository into a well-known location in your home directory. If you choose a different directory, appropriately change the directory given in the rest of documentation. In a terminal from any directory, enter

    cd ~
    mkdir gitlab.cs.nuim.ie
    cd gitlab.cs.nuim.ie
    mkdir ctgames
    cd ctgames
    git clone git@gitlab.cs.nuim.ie:ctgames/ctgames.git
    cd ctgames
    git status
    

    The output from the last command should read something like “On branch master Your branch is up to date with ‘origin/master’. nothing to commit, working tree clean.”

  2. View recent commits to the git repository

    This gives you an idea of the activity in the git repository. All team members code changes are visible. In the terminal, from any directory in the cloned git repository, enter

    gitk --all
    

4.4.2.3. Install Miniconda (a mini version of the Anaconda Python distribution)

  1. Download Miniconda

    Press the key combination Ctrl-Alt-t to open a new terminal and enter (two of these lines are very long – make sure to scroll to the right to copy each line in full)

    mkdir -p ~/miniconda3
    cd ~/miniconda3
    wget https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh -O miniconda.sh
    echo "634d76df5e489c44ade4085552b97bebc786d49245ed1a830022b0b406de5817  miniconda.sh" | shasum -a 256 --check
    

    You should get the response “miniconda.sh: OK”. If not, the file was not downloaded correctly.

  2. Install Miniconda

    In the same terminal, enter (make sure to notice the dot at the end of the first line)

    bash miniconda.sh -b -u -p .
    rm -rf miniconda.sh
    

    Initialise Miniconda for the bash shell by entering, in the same terminal, the command

    bin/conda init bash
    
  3. Test Miniconda

    After installation, close the terminal (by entering exit), reopen a new terminal (e.g. Ctrl-Alt-t), and test your installation by entering

    conda list
    

    You should see a list of packages installed, including two with names “conda” and “python”. Ensure Anaconda Python has been installed by default, by entering

    python
    

    If the first line is of the form “Python 3.11.4 (main, Jul 5 2023, 13:45:01) [GCC 11.2.0] on linux” then Miniconda was installed correctly. Press Ctrl-d to exit Python.