Archive for July, 2013

Using Github on Windows

Published by chengjun on July 16th, 2013

It’s fairly painful to use github on windows in the past days. However, such a pain has already become a story recently. Github officially release the software for windows users, which makes it pretty easy to pull files from github website and push your modification on your local computer to the web.

github

1. Download and install the software

http://windows.github.com/

Install the software and login in with your Github accounts and password.

2. Clone with a click

For example, I have been working on writing a book on computational social science with my collaborators. He makes a repository on github names css. I want to clone this repository to my local computer, add files, and push the files onto the github website.

There are two “places” that I can manipulate: “local” and “github”.

github_local

The first step is to clone this repository.Click the “github” first to find the “css” repository. Just clicking “clone the repository” to pull the files to your local computer.

2. Add files directly to your local github directory

You can manually add files and make changes freely.

For example, I add a markdown file named “chaper11.md” to the sub-directory of “css” repository on my local computer.

By the way, I suggest the new beginners to use the MarkdownPad (http://markdownpad.com/) to write markdown files. Using MarkdownPad, you can instantly see what your Markdown documents look like in HTML. While you type, LivePreview will automatically scroll to the current location you’re editing.

3. Sync the changes to github

sync_gighub

After that the software detect the change, as it has been showed in the figure above. You can enter the commit message which is required and click the commit the button.

Finally, click the sync button on the top to manually push the changes to the github website.

See, it’s so easy. Now, you don’t need to program for pulling and pushing your github files. I guess you have no excuse to reject Github now. Then, start to use it.