| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Getting Started with Git and GitHub

Page history last edited by Jeriel Jan del Prado 13 years, 6 months ago

 

Getting Started with GitHub

 

The idea:

  • GitHub is a place for you to upload your code.
  • You need Git first before you can do things.
  • Git serves us your upload tool to GitHub.

 

Do these first:

  1. Have a GitHub account
  2. Download the necessary stuff
    • msysgit: Git for Windows. get the latest.
    • (Optional) smartgit:  For those who want to use Git on a GUI.
  3. Install msysgit. 

 

Setting up Git and GitHub

 

I. SSH Keys

The idea here is that your computer will have to generate a key, so that GitHub will recognize you and your PC.

 

Just follow the instructions at http://help.github.com/msysgit-key-setup/. You can skip the backup and remove part.

 

To those who are lazy to read all that text:

  1. Open up Git Bash
  2. Enter "ssh-keygen -t rsa -C "<your email>""
  3. It should ask for a passphrase. That's up to you. (think: password)

               Note: If you're typing your passphrase and nothing seems to show up, don't worry. Just keep on typing (unix-like terminals tend not to show even the password dots.)

  1. Go to your GitHub Account Settings -> SSH Public Keys
  2. Add a public key
  3. Enter a title of your choice.
  4. Copy-paste from the generated key (located at your .ssh folder in your Profile directory [C:\Users\<username>\ or C:\Documents and Settings\<username>\)
  5. Add Key, done!

 

To check if you're really doing it right:

  1. Go back to Git Bash
  2. Enter "ssh git@github.com"
  3. Enter "yes"
  4. If it says you're authenticated, well done.

 

 

II. Repositories

Repositories serve as a "folder" for your code in GitHub. Just go to GitHub -> Dashboard -> "New Repository"

You will receive instructions once you added your own repository. Follow them.

 

III. Pushing your own stuff

In Git, pushing is the equivalent of uploading your files. If you've performed the stuff in step II properly, you should get a new folder on your Profile directory. This folder represents your repository on GitHub.

 

All you have to do is just place your files in that directory, then:

  1. Open up Git Bash
  2. Open that directory from there (i.e., use "cd <your folder>")
  3. Add the new files  (i.e., "git add ." )
  4. Commit your changes (i.e., "git commit -a -v")
  5. Push! (i.e., "git push origin master")
  6. Go to your GitHub dashboard, you should see updates on your new repository. 

 

If you can view your source code from GitHub, then you're done.

 

(Optional)

Making a blog within GitHub

Instructions are here: http://github.com/blog/272-github-pages

 

Basically:

  1. Make a repository, name it as <yourusername>.github.com
  2. Push your web files to that repository. (Make sure to add an index.html)
  3. ???
  4. Done! Wait for 10 minutes (or a day, sometimes it just fails horribly) and you should be able to view your site at <yourusername>.github.com with your files.

          -If you get a Github Pages message, all you have to do is wait.

 

 

 

 

Comments (0)

You don't have permission to comment on this page.