Git For Windows

THL Toolbox > Developers' Zone > GIT for Windows

GIT for Windows

Contributor(s): Than Grove

Initial GIT Set Up

  1. Install Git
  2. Get an account on Github
  3. Open local terminal window
  4. Set up SSH Keys:
    1. Type:
      ssh-keygen -t rsa -C ""
    2. Create pass phrase
    3. In folder C:/Users/{Profile name}, open file called “id_rsa_pub” and copy contents to clipboard.
    4. Go to GitHub  Account Setting  SSH Keys.
    5. Click “Add Keys”.
    6. Give it a descriptive name and paste in the key and save.
  5. Set global Git Config, by typing:
    git config --global "GIT Acct Name" 
    git config --global ""
  6. Create a file in C:/Users/{Profile Name} called “.bashrc” with the following contents:
    eval `ssh-agent -t14400` (Note: 14400 = 4 hrs)

Adding a Repo

  1. Create repository on git hub. Say, for instance, it is called, “mycode”
  2. Open Terminal. It should ask for your passphrase. Enter it and navigate to folder that will be the repo’s root, the “mycode” folder.
  3. Type: git init
  4. Type: git add .
  5. Type: git commit –m “Initial Commit”
  6. Type: git remote add origin
  7. Type: git push origin master

In Aptana

After the initial GIT set up you can do much of the console commands in Aptana. With an existing folder, you can add it as a project within the Aptana project explorer:

  1. Open Project Explorer side pane
  2. Right click on it and choose “Import”
  3. Choose “Existing Folder as New Project” and click next.
  4. Fill in the Promote to Project Page:
    1. Browse to select the root folder of project
    2. Give it a project name (same as repo?)
    3. Choose project type
    4. Click “Finish”.
  5. Then open the terminal window and initialize the repo as in the “Adding Repo” section.
  6. To connect an Aptana project to a Git repo, right click on the project root folder/name and choose Team  Share Project.
  7. After that the “Team” context menu will have the regular Git commands: Push, Pull, Stage, Commit, Status, etc.

Provided for unrestricted use by the external link: Tibetan and Himalayan Library