Setting up a New Git Repository on Bluehost Shared Hosting from Windows

I can never remember how to setup a new repository. Here are the instructions:

  1. Create repository in windows folder
    1. Select the folder and right-click, select Create New Repository Here
    2. Don’t make it bare
    3. Commit a first, empty change
      1. Right click and commit -> “Master”
      2. In the message box type “Repo Init commit”
      3. Check the box at the bottom for “Message Only”
      4. Click Okay
    4. Modify Gitolite User Management
      1. Add Gitolite repository
      2. Add User[s] with RW+
    5. Setup Repo on Server
      1. Login with Putty
      2. Goto repositories Folder (example, ‘repositories’)
      3. Type mkdir [newreponame].git
      4. Type git init –bare
    6. Push the new Windows Repository to the new bare repository
      1. In Windows, right click Git root folder, choose Tortoise->Push…
        1. Local: master (default)
        2. Select Remote->Manage button
          1. Remote: Server[reponame]
          2. URL: [coreserveruser]@serveraddy.com:[reponame]
          3. Click Okay
        3. Click Okay
    7. Done!

Leave a Reply