       return cb(err) if err
       if s isnt 200 then cb(new Error("Repo tree error")) else cb null, b, h
 
+  # Create a tree object
+  # '/repos/pksunkara/hub/git/trees' POST
+  createTree: (tree, cbOrBase, cb) ->
+    if !cb? and cbOrBase
+      cb = cbOrBase
+      cbOrBase = null
+    @client.post "/repos/#{@name}/git/trees", {tree: tree, base_tree: cbOrBase}, (err, s, b) ->
+      return cb(err) if err
+      if s isnt 201 then cb(new Error("Repo createTree error")) else cb null, b
+
+  # Get a reference
+  # '/repos/pksunkara/hub/git/refs/REF' GET
+  ref: (ref, cb) ->
+    @client.get "/repos/#{@name}/git/refs/#{ref}", (err, s, b) ->
+      return cb(err) if err
+      if s isnt 200 then cb(new Error("Repo ref error")) else cb null, b
+
+  # Update a reference
+  # '/repos/pksunkara/hub/git/refs/REF' PATCH
+  updateRef: (ref, sha, cb) ->
+    @client.post "/repos/#{@name}/git/refs/#{ref}", {sha: sha}, (err, s, b) ->
+      return cb(err) if err
+      if s isnt 200 then cb(new Error("Repo updateRef error")) else cb null, b
+
   # Delete the repository
   # '/repos/pksunkara/hub' DELETE
   destroy: ->

    , (err, s, b, h) ->
      return cb(err) if (err)
      if s isnt 200 then cb(new Error("Repo blob error")) else cb null, b, h

  # Get a git tree
  # '/repos/pksunkara/hub/git/trees/SHA' GET

      return cb(err) if err
      if s isnt 200 then cb(new Error("Repo commits error")) else cb null, b, h

  # Create a commit
  # '/repos/pksunkara/hub/git/commits' POST
  createCommit: (message, tree, parents, cb) ->
    @client.post "/repos/#{@name}/git/commits", {message: message, parents: parents, tree: tree}, (err, s, b) ->
      return cb(err) if err
      if s isnt 201 then cb(new Error("Repo createCommit error")) else cb null, b

  # Get the tags for a repository
  # '/repos/pksunkara/hub/tags' GET
  tags: (cb) ->
