Code Repositories

  1. GitHub
    • Free: Your code will be publicly available
    • Paid: You can keep your repositories private
  2. Bitbucket
    • Unlimited private code repositories
    • Free for 5 users
    • Git Or Mercurial
    • Lightweight Code Review
    • Mac and Windows Client
  3. Dropbox with Git (Ref)
    • Dropbox is well known service for sharing in cloud. This can be used with Git to serve to some extent. You can create a git directory in Dropbox folder and initialize some bare repositories there. Now from your local git repos, you can push (as a local file) to the Dropbox directory as the origin.
      Setup is something like this:

       ~/project $ git init
       ~/project $ git add .
       ~/project $ git commit -m "first commit"
       ~/project $ cd ~/Dropbox/git
       ~/Dropbox/git $ git init --bare project.git
       ~/Dropbox/git $ cd ~/project
       ~/project $ git remote add origin ~/Dropbox/git/project.git
       ~/project $ git push -u origin master

      The first 3 lines initialise, add and commit git to existing project’s folder while you can learn detailed steps of adding git to existing project here. Now you can perform git fetch/pull/merge/clone etc commands. For example you can clone anywhere on your computer.

      ~/SomeFolder $ git clone ~/Dropbox/git/project.git

      You can also check out via Xcode->Source Control->Check Out by providing the git repository’s path ~/Dropbox/git/project.git.

      You would also need to adjust the remote url of your dropbox git repository as the dropbox path may vary on your home computer than your office computer.

      ~/SomeFolder $ git remote set-url origin ~/HomeComputer/Dropbox/git/project.git

      You can view the remote url with the following command:

      ~/SomeFolder $ git remote show origin
  4. Google Drive with Git
    • Google Drive offers 15GB (as per this writing) free shared with Gmail and Google+ Photos. Git can also be used with Google Drive like that with Dropbox as shown above.
  1. Troubleshooting
    1. While working with Google Drive or Dropbox, you may encounter with error, “‘atal: Reference has invalid format: ‘refs/Icon”. So, you can get rid of this error by following these instructions.
    2. For error, “fatal: ‘your repo path’ does not appear to be a git repository”, try the path pattern with file:// at the start
      $ git remote set-url origin "file:///Dropbox/git/project.git"

One thought on “Code Repositories

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s