Interactive News Design, Week 2. s

Using GitHub


Using GitHub

Git is the way most programmers work on coding projects together. You’ll need to submit your coding assignments to the class Git project (called a repository or repo). Git can seem complicated, but you’ll get the hang of publishing the code changes you make on your computer out to the repository, where others can see them.

The class repo, which holds all of our assignments, is here:
https://github.com/tysone/2014-columbia-projects

The code in that project is viewable here:
http://tysone.github.io/2014-columbia-projects/

You should have your own folder in the repository where you can submit assignments.

Using GitHub software

1. Download and install the GitHub software (Mac or Windows), which lets you make changes to your projects and sync them with the class repo.

2. After you install, launch the application. (If the application asks if you want to move the program into the Applications folder, say yes). To start the setup, click Continue and enter your Git login credentials. You don’t need to add any local repositories.

3. You should now see a window that lists the tysone/2014-columbia-projects Git repo. To bring the project onto your computer, click "Clone to computer," and choose where you want to keep the files.

4. Click the arrow next to the 2014-columbia-projects repo name to bring up details about the class repo. You're now ready to make changes to your HTML, CSS, images, or other files on your computer and sync them with git. Make sure you only change or add files in your own folder – if you modify somebody else's folder, it would be easy to overwrite their changes too.

5. After you've made changes to any files on your computer, you can use the GitHub software to sync those changes with Git. Go to GitHub, make sure you're in the 2014-columbia-projects repo, and click on the "Changes" tab. This tab should show all of the local changes you've made since the last time you synced with Git.

6. To sync your changes in Git, you make something called a commit. Type in a few words about what you've changed into the "Commit summary" field. That message can let other people know what you've changed, or remind yourself what you've changed later.

7. Click the small square button with two arrows so that all of your commits will be automatically synced with Git. (That button is to the left of the bigger Commit button).

8. Click the 'Commit & Sync' button to sync your changes. The local changes on your computer have now been pushed out to the class website. If you look at the History tab, you should see a list of your commits and what code or files were changed with each commit.

9. Take a look at your folder on the class repo. The first time you make a commit, navigate to the file you changed just to make sure that your changes went through. They should also be updated on the class website.