Skip to content

Instantly share code, notes, and snippets.

@benjaminparnell
Created February 10, 2014 20:43
Show Gist options
  • Save benjaminparnell/8923798 to your computer and use it in GitHub Desktop.
Save benjaminparnell/8923798 to your computer and use it in GitHub Desktop.

Git instructions for Alfie

Following are your instructions for uploading your completed work to the github repo I set up for you. Follow these carefully, and if you have any questions just let me know!

1. Getting setup

Before you start writing code, do the following things. Open up Git-Bash (the terminal program I put on your desktop/taskbar for you), then cd into the project folder (this path is correct I think, but you get the idea):

cd Desktop/computing/Python/alfiespython

The make sure you are on the alfie branch. The current branch is show in brackets at the end of the prompt: (alfie).

Before you start work, check to see if there are any changes by running this command (assuming you have done everything in the above step):

git pull --rebase origin master

This will pull down any changes I have made and put them on your branch. I would recommend running this every time just to see if I have added anything. If I haven't, you will see a message saying you are up to date.

2. Write code!

Now start writing code! Remember, stay on the alfie branch at all times. In each folder (week1 for example), you will find a README.md file with instructions for that week. I will have already provided the file for you to work in, with some tips, so look out for that (its numbers.py in week1).

3. Upload what you have done

When you have finished and you want to submit the code, run these commands. Make sure you are in the alfie branch.

git add --all

git commit -am "WRITE A MESSSAGE HERE"

Your message can be anything you want. Just say how you got on or what you managed to do. When that has gone through without errors, run:

git push

This will push you code to the alfie branch of the repo on github. Then, go to the alfie branch of the repo on github (here) and click the green compare and review button. Make sure you are logged in! You should see a comparison of your changes that you have just pushed to the alfie branch against the master branch. If you do then good! If you don't, something has gone wrong. Ask me.

Click the Start a discussion about this comparison to make it into a pull request link. Write me a short comment to let me know how you did, and then click send. I will do the rest, and I will let you know when new challenges are up!


I hope this all makes sense. Don't be afraid to ask for help if you need it, and remember google is your friend! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment