Redwing Pi goes to github!

Just created a repository for my set-up scripts (which form the backbone of my “Redwing Pi”).

I’ve written some instructions for myself for getting existing code into a repository on Git.
Here goes:

First of all, go to and register if you haven't done so and then login after confirming the email they sent you.

Click the Book+ icon at the top right of the browser window to add a new "Repo" (code repository).
When you create it, bear in mind that the folder name when you get the code onto your Pi will be given that name.
Allow it to create a README file - this will help you later.
Finish that process.

Go to your Pi.
apt-get install git
Now go and get the repository code (which is just a README file at the moment):
git clone<your username>/<your repo name>

You should now have a folder called <your repo name>
cd into the folder.
You should see a single file -

Now, get your pre-created code into the folder:
cp <filename> .

If you have folders full of code:
cp -R <filepath> .

Now, add all the files to your LOCAL repo (on your Pi):
git add *

Now commit your 'changes' to the LOCAL repo
git commit origin master

This will open up an editor (normally 'nano').
Add a comment to say that it's your first revision. Write the file to the filename it gives you and then exit.
This will commit it to the local repo.

Now upload it to the remote repo at
git push origin master
Put your username/password in and it should upload. You can check this in your browser as the 'age' should change to something like "a minute ago"

From now on when you add a file, do
git add *

From now on when you change a file, you should just do:
git commit .
git push

If it says "Everything up-to-date" then you've uploaded all your changes already.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.