You are done with this section when you
Have a Github account, and Git installed on your computer
Have a text editor (preferably Sublime Text)
Have checked out and commited an edit for the guestbook repo
Git is a revision control system created by Linus Torvalds (the Linux creator) that stores all of the revision history locally as well as in the remote repository.
It's super-great for personal projects because it lets you go back to earlier versions of the code you write.
It's essential for coding as a team.
is an online platform that hosts git repositories.
If you have done this already, just make sure you can use Git on the command line. And please help someone near you.
Sign up at https://github.com/ — pick a username that's not embarrassing to show employers.
The login screen shows steps in the Github bootcamp which get you started. Right now please do the following steps in Set up Git:
If you do not know what a terminal is, this short Git Bash Tutorial (3 minutes) is for Windows users but will help everyone enough for right now.
You can use the shell to
help
which git
echo "foo\nbar\nbaz" > foo.txt
head foo.txt
wc -l foo.txt # number of lines in a file
grep bar *
ls *.txt
rm foo.txt
cd /bin
ls -1
And much more
We recommend https authentication not ssh authentication, and that you follow the linked instructions to set up the password caching feature.
Follow the instructions in the GitHub Bootcamp but use my guestbook repo instead of the example.
git clone <the copied URL>
If your Git is set up correctly (with the password caching) you should now have a folder called gittyup with the contents of your GitHub repo. If not, ask for help.We recommend Sublime Text. If you prefer Emacs, Vi, or another editor go right ahead and keep using that (but you might be glad you tried it).
Otherwise, please go to the Sublime Text download page, and download and install the correct version for your OS. We are intentionally using Sublime Text 3 because it has a command-line version for Windows.
Advanced coders may be interested in keyboard shortcuts (OSX, or Windows/Linux). They are by no means necessary to use Sublime Text.
↩ 'enter' | ⇧ 'shift' | ⌫ 'delete' | ⌃ 'control' | ⌥ 'option' |
It will be worth it to set up the command-line functionality for Sublime Text. I think this happens out of the box for OSX and Linux users. For Windows users, please follow these instructions. You can check that it works by typing
subl
on the command line.
If you know how to set a path in Windows, chances are good someone else will be really grateful for your help — please look around!
We will modify guestbook.txt. Just type the following on the command line to open it in the Sublime Text editor:
subl guestbook.txt
Then make your change, save, and close.
See how Git helps you keep track of your work by typing in the shell:
git status
git diff
Then add your change to your local repo and push it to GitHub:
git add guestbook.txt
git commit -m'signed the guestbook'
git push
Most every project will have the following
The gittyup project also has an index.html that was set up to work with Github pages (every GitHub project is allowed its own static web site), and the guestbook.txt that contains the guest list displayed in the index.html.
You can get help on options for the git command by typing this in the shell:
git help
If you want to contribute to other open-source projects on Github, this is how you would do it!
but please wait until I've accepted your request...
Halfway done! You are ready for the install Python step!