 
 create_tree = (root, tree) ->
   get_tree_sha.call(@, tree)
-  .then (sha) -> { path: root.path, mode: '040000', type: 'tree', sha: sha }
+  .then (sha) -> { path: path.basename(root.path), mode: '040000', type: 'tree', sha: sha }
 
 ###*
  * Given a file's content, creates a blob through github and returns the sha.

    .then(build_tree)
    .then(create_commit)
    .then(update_gh_pages_branch)
    .done(d.resolve, d.reject)

  return d.promise

###

build_tree = ->
  file_map(@root, { file_ignores: @config.ignore })
    .then (tree) => format_tree.call(@, path: '', children: tree)

###*
