Setting up Git on Coda 2

git is a program used to track all of the changes in your code. If you have never seen it before, getting started can be daunting.

Follow this procedure to get yourself up and running with git + coda 2 within minutes.
  1. Create a new site

    Give your site a nickname AND a Local Root folder. The Local Root folder is just where on your computer to store this project's files.

    Click on the Source Icon to connect with git.
  2. Clone a git repository

    The url should be the one provided by your team or git host for the project.

    E.g. for bitbucket:

    git@bitbucket.org:whitau/sp-frontend.git

    and for github:

    git@github.com:rozifus/TeamStrong12_9.git

    The password is your own bitbucket account's password (required if you are connecting via a https URL rather than ssh)
  3. Hit Save - You are all done

    Note that control has been switched to "on"

    Click Save.
  4. Add a new file

    Here I've created two folders
    site and templates

    inside templates I created a file called index.html
  5. Edit the file

    Edit the index.html file and put some serious code inside.

    This is version 1.0 of your app!
  6. Enable the Source Control Sidebar

    Access the Source Control Status Sidebar from the "View" menu.

    You'll see an "add" button next to your "site" folder in the right panel.

    Click "add". This tells the version control system to start tracking your "site" folder.
  7. Commit the index.html file

    Your index.html isn't in version control yet. So click the commit icon next to the file.

    You'll be prompted for a message. Just explain what you've done:

    "First version of our web 2.0 app"
  8. Push and Pull changes

    When you are done working for the day, you should "push" your changes to the github or bitbucket server.

    This does two things:

    1. backs up your work
    2. lets your team mates work on your latest changes

    When you begin working for the day, you should always

    "pull" the latest changes. That way if anything has changed over night, you'll get the latest version to start working on.