-
Notifications
You must be signed in to change notification settings - Fork 43
Creating your git repository (fork)
The basic purpose of git is to allow you to regularly save all your changes to a code so you can go back and see where you screwed up when things don't work or revert to an earlier version that is functional and try again. In a collaboration, it allows you to see where other people screwed up, and blame them (GitHub really has a blame
button). You can also essentially use it like a fancy version of dropbox, to store all your files related to a code project, along with documentation related to it in a wiki like this one.
Note that Git is the version control system that lets you manage and keep track of your source code history, whereas GitHub is a cloud-based hosting service that lets you manage Git repositories - there are other options for the latter such as BitBucket, but all use Git. (This distinction isn't really important, but software developers think it is, so I feel obliged to tell you.)
A complete but far too comprehensive guide to git is here (someone has labelled it a "git quick guide", without even a hint of irony). The GitHub starters guide is more useful.
In this wiki I have written some simpler, but inevitably more inaccurate git instructions to get you going. Apologies to git purists.
If you don't have one already, go to git and setup a username and profile:
https://github.com
Given that you may want to use this profile in future professional contexts (some employers like to see your git activity, as a way of verifying your skills), I recommend that you don't call yourself something silly like DrFluffyCat
, but use something close to your actual name as the username (this is the voice of experience speaking).
Once you exist as a user in GitHub, you can navigate back to the main page of this repository, and you should see a big green code
button. If you wanted to download this repository directly, this is what you would click to get the links (more details later).
However, you don't really want my repository, you would like your own one so that you can make a mess of it without annoying me and everyone else on the course by accidentally deleting things or adding junk. But you want to be connected to my repository so that if I update the material you can access these updates easily.
Therefore what you want is a fork.
The git instructions for making a fork are here.
The main step is to go to the button Fork
at the top right of the repo, and click on it. You will then create a new repository called https://github.com/DrFluffyCat/TopicsInSciComp
(assuming you ignored my recommendation above and set your username to DrFluffyCat
) that has https://github.com/KAClough/TopicsInSciComp
as its parent.
You can now work on this fork freely and without fear - the beauty of git is that it saves everything, so even if you accidentally delete files they can be recovered.
Since these repositories are public, anyone can see them, including me, your lecturer. You can use them to share code with me or your fellow students, and I will be asking you to upload your solutions to the activities each week to your fork, so that I can use them to track your progress and ensure you are engaged in the course. I won't judge you for being messy in this space, but be aware that it is public, especially when composing commit messages.
Copyright K Clough/QMUL 2023