ssh firstname.lastname@example.orgRun the latest package update and upgrades, just to make sure everything is current.
sudo apt-get updateThen the upgrade:
sudo apt-get upgradeThen reboot:
sudo apt-get install wget git-coreYou'll see terminal output. In this case, the packages were already installed (maybe with the update/upgrade from last step), but you see some sort of success at this point.
ssh email@example.comWhat we then type in;
mkdir usbdrvWhat we are going to set up is a mount point — a way to always map this directory to the USB drive.
sudo blkidcheck out output — we are looking for the USB drive device info, which is easy to identify because we called it GITPI when we initialized it.
sudo nano /etc/fstabHere is the tricky part. We are going to modify the fstab file so that this device maps to the usbdrv directory.
nano usbdrv/test.txtThis will create a text file in the usbdrv directory — which is actually the USB thumb drive itself called test.txt. Put some text in the file, like mine pictured here.
ls usbdrvAnd you'll see a lone file, test.txt.
cd /Users/scottkildall/PythonScripts/justdiedbot git initNow, do a similar thing on your Raspberry Pi. In a second Terminal window, ssh back into the Pi. We are going to create a directory called justdiedbot and initialize it with Git. Once again, substitute your source directory names rather than using mine.
mkdir usbdrv/justdiedbot.git cd usbdrv/justdiedbot.git git init --bareThis creates a new directory with a .git extension and an empty Git repository. For the geeks in the audience, here is a detailed discussion of what the --bare flag does.
Note: some readers of this Instructable have reported that you need to call "sudo" before the git init steps, so if you have permissions errors, type in: "sudo git init"
cd /Users/scottkildall/PythonScripts/justdiedbotOf course, you should type in your local directory path. One trick with the Finder is that you can drag-and-drop the folder to complete the path, typing in 'cd ' and then drag the folder into the Terminal window.
git remote add pi firstname.lastname@example.org:/home/pi/usbdrv/justdiedbot.gitYou only have to add the remote one time. From here on out, we will refer to this remote as pi.
git add . git commit -m "initial commit" git push pi masterThis will add all the files in the justdiedbot directory, commit the adds with the message, then push them onto your GitPi.
Enter the email associated with your account and we will send you your username and a temporary password.
That's a pro feature!
Want to go pro?
First step is to sign up.
Already a member?" Login »