Git and Github
Git and Github
Many classes in the CCI will either require or encourage you to use git and github in your work.
These can be complex and confusing at first, and how you use them depends a bit on what you
need to do.
git vs github
The first distinction that's normally quite important to make is that git and github are related but
different things.
git is a piece of software that lives on your computer. It is used for saving versions of files that you
are working on -- this is called 'version control'. Git is used on one folder at a time -- a folder that is
being versioned with git is called a 'git repository'.
github is a website online. It's used to share git repositories, and has a bunch of tools to allow
people to collaborate on code. It's not the only website people use to do this, but it's the main one
and it's very popular.
git.arts.ac.uk is a version of the Github website that is managed by the CCI. It is often used for
classes, as it allows CCI students (but not anyone else) to access the files. If you have a github
account, it will not work with git.arts.ac.uk (you need to use your UAL account instead), but
otherwise repositories will work the same (e.g. github desktop and the command line will still
work).
SUMMARY:
github desktop does the same job as using git from the command line -- it runs locally
on your computer and allows you to both version files, and pull repositories from online.
github and git.arts.ac.uk are both websites that people use to share and collaborate on
git repositories.
At each of these points, you should end up with 2 things -- a local repository on your computer,
that you can edit and run, and a remote repository on github (or git.arts). These things will be
related, and if you own the remote repository, you should be able to push to it.
git setup
If you want to use git from the command line, there are a couple of extra setup steps, including
making an SSH key. If you plan to use git for many projects, or learn how to use git professionally,
this is a good idea. There are instructions for this process here.
If you are just getting started, or only want to use git for a one-off, you can follow these instructions
to set up and configure Github Desktop.
Get the url of the repository from the green 'code' button to the right of the repository's page.
Navigate to the folder where you want to have the repository on your computer, then use the git
clone command to clone it.
cd where/you/want/repo
cd repo-name
Revision #2
Created 21 February 2024 10:26:37 by agnes cameron
Updated 21 February 2024 13:23:56 by agnes cameron