git clone https://github.com/CTEC3905/02-lab.git
(NOTE: you may need to log in with your GitHub credentials at this stage, more than once, so just keep signing in!) - you can ignore the separate first-time git setup request asking for your email etc. - it’s not needed)git status
which should tell you that it’s not a GIT repositorygit init
to turn your code into a repository, then git status
which will show your files not yet added in redgit add .
(the dot is a wildcard that means “all files”) - this “stages” your files ready for saving. Type git status
again to see that your files are now coloured greengit commit -m "my first commit"
which will save or “commit” your “staged” files to the repositorygit status
again - your changed file will be coloured red. Repeat steps 3 and 4, using a different commit message in step 4git remote set-url origin your_repo_url.git
(replace your_repo_url.git
with the URL from step 2), then check that it’s correct by typing git remote -v
git status
will check if your repo is ready to go (if not, “add” and “commit” as in steps 3 and 4 in the previous exercise), then git push -u origin master
will push your code to GitHub and set the remote for this repo permanently - after this, in future git push
is all you need - reload your repository page on GitHub and your code should have appeared#
is Markdown for h1
), two newlines and the sentence “Code from CTEC3905 second lab” (which will automatically create an HTML p
tag on your GitHub code page), then in the command prompt type git add .
and git commit
as before, then git push
. Wait for GIT to finish pushing your code to GitHub, then reload the GitHub page to see your changesNow follow the link to the GitHub classroom under the Assessment Tab (you may be asked to log into your GitHub account). You must then find your P-number from the (sorry very long) list. This will generate a repo and simple starter code in the CTEC3905 organisation. You then need to clone this repo to the computer on which you are working. This is the repo for your assignment code. This is private, so can be viewed only by you and module staff. You can now push any work you do on your assignment to this repo. If you have existing code, please examine the starter files carefully before adding any of your own code to them - they contain essential code required for the assignment.