diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt
index 1aa9396..7f13820 100644
--- a/docs/manifest-format.txt
+++ b/docs/manifest-format.txt
@@ -50,7 +50,9 @@
     <!ATTLIST url              CDATA #REQUIRED>
 
     <!ELEMENT project (annotation*,
-                       project*)>
+                       project*,
+                       copyfile?,
+                       linkfile?)>
     <!ATTLIST project name        CDATA #REQUIRED>
     <!ATTLIST project path        CDATA #IMPLIED>
     <!ATTLIST project remote      IDREF #IMPLIED>
@@ -68,6 +70,14 @@
     <!ATTLIST annotation value CDATA #REQUIRED>
     <!ATTLIST annotation keep  CDATA "true">
 
+    <!ELEMENT copyfile (EMPTY)>
+    <!ATTLIST src value  CDATA #REQUIRED>
+    <!ATTLIST dest value CDATA #REQUIRED>
+
+    <!ELEMENT linkfile (EMPTY)>
+    <!ATTLIST src value  CDATA #REQUIRED>
+    <!ATTLIST dest value CDATA #REQUIRED>
+
     <!ELEMENT extend-project>
     <!ATTLIST extend-project name CDATA #REQUIRED>
     <!ATTLIST extend-project path CDATA #IMPLIED>
@@ -285,6 +295,21 @@
 "false".  This attribute determines whether or not the annotation will
 be kept when exported with the manifest subcommand.
 
+Element copyfile
+----------------
+
+Zero or more copyfile elements may be specified as children of a
+project element. Each element describes a src-dest pair of files;
+the "src" file will be copied to the "dest" place during 'repo sync'
+command.
+"src" is project relative, "dest" is relative to the top of the tree.
+
+Element linkfile
+----------------
+
+It's just like copyfile and runs at the same time as copyfile but
+instead of copying it creates a symlink.
+
 Element remove-project
 ----------------------
 
diff --git a/gitc_utils.py b/gitc_utils.py
index d082c8d..dd38f89 100644
--- a/gitc_utils.py
+++ b/gitc_utils.py
@@ -15,6 +15,8 @@
 
 from __future__ import print_function
 import os
+import platform
+import re
 import sys
 import time
 
@@ -22,7 +24,6 @@
 import git_config
 import wrapper
 
-
 GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
 NUM_BATCH_RETRIEVE_REVISIONID = 300
 
@@ -65,26 +66,82 @@
       sys.exit(1)
     proj.revisionExpr = gitcmd.stdout.split('\t')[0]
 
-def generate_gitc_manifest(client_dir, manifest, projects=None):
+def _manifest_groups(manifest):
+  """Returns the manifest group string that should be synced
+
+  This is the same logic used by Command.GetProjects(), which is used during
+  repo sync
+
+  @param manifest: The XmlManifest object
+  """
+  mp = manifest.manifestProject
+  groups = mp.config.GetString('manifest.groups')
+  if not groups:
+    groups = 'default,platform-' + platform.system().lower()
+  return groups
+
+def generate_gitc_manifest(gitc_manifest, manifest, paths=None):
   """Generate a manifest for shafsd to use for this GITC client.
 
-  @param client_dir: GITC client directory to install the .manifest file in.
-  @param manifest: XmlManifest object representing the repo manifest.
-  @param projects: List of projects we want to update, this must be a sublist
-                   of manifest.projects to work properly. If not provided,
-                   manifest.projects is used.
+  @param gitc_manifest: Current gitc manifest, or None if there isn't one yet.
+  @param manifest: A GitcManifest object loaded with the current repo manifest.
+  @param paths: List of project paths we want to update.
   """
+
   print('Generating GITC Manifest by fetching revision SHAs for each '
         'project.')
-  if projects is None:
-    projects = manifest.projects
+  if paths is None:
+    paths = manifest.paths.keys()
+
+  groups = [x for x in re.split(r'[,\s]+', _manifest_groups(manifest)) if x]
+
+  # Convert the paths to projects, and filter them to the matched groups.
+  projects = [manifest.paths[p] for p in paths]
+  projects = [p for p in projects if p.MatchesGroups(groups)]
+
+  if gitc_manifest is not None:
+    for path, proj in manifest.paths.iteritems():
+      if not proj.MatchesGroups(groups):
+        continue
+
+      if not proj.upstream and not git_config.IsId(proj.revisionExpr):
+        proj.upstream = proj.revisionExpr
+
+      if not path in gitc_manifest.paths:
+        # Any new projects need their first revision, even if we weren't asked
+        # for them.
+        projects.append(proj)
+      elif not path in paths:
+        # And copy revisions from the previous manifest if we're not updating
+        # them now.
+        gitc_proj = gitc_manifest.paths[path]
+        if gitc_proj.old_revision:
+          proj.revisionExpr = None
+          proj.old_revision = gitc_proj.old_revision
+        else:
+          proj.revisionExpr = gitc_proj.revisionExpr
+
   index = 0
   while index < len(projects):
     _set_project_revisions(
         projects[index:(index+NUM_BATCH_RETRIEVE_REVISIONID)])
     index += NUM_BATCH_RETRIEVE_REVISIONID
+
+  if gitc_manifest is not None:
+    for path, proj in gitc_manifest.paths.iteritems():
+      if proj.old_revision and path in paths:
+        # If we updated a project that has been started, keep the old-revision
+        # updated.
+        repo_proj = manifest.paths[path]
+        repo_proj.old_revision = repo_proj.revisionExpr
+        repo_proj.revisionExpr = None
+
+  # Convert URLs from relative to absolute.
+  for name, remote in manifest.remotes.iteritems():
+    remote.fetchUrl = remote.resolvedFetchUrl
+
   # Save the manifest.
-  save_manifest(manifest, client_dir=client_dir)
+  save_manifest(manifest)
 
 def save_manifest(manifest, client_dir=None):
   """Save the manifest file in the client_dir.
@@ -95,7 +152,7 @@
   if not client_dir:
     client_dir = manifest.gitc_client_dir
   with open(os.path.join(client_dir, '.manifest'), 'w') as f:
-    manifest.Save(f)
+    manifest.Save(f, groups=_manifest_groups(manifest))
   # TODO(sbasi/jorg): Come up with a solution to remove the sleep below.
   # Give the GITC filesystem time to register the manifest changes.
-  time.sleep(3)
\ No newline at end of file
+  time.sleep(3)
diff --git a/manifest_xml.py b/manifest_xml.py
index a7fe8dd..3ac607e 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -167,12 +167,13 @@
   def _ParseGroups(self, groups):
     return [x for x in re.split(r'[,\s]+', groups) if x]
 
-  def Save(self, fd, peg_rev=False, peg_rev_upstream=True):
+  def Save(self, fd, peg_rev=False, peg_rev_upstream=True, groups=None):
     """Write the current manifest out to the given file descriptor.
     """
     mp = self.manifestProject
 
-    groups = mp.config.GetString('manifest.groups')
+    if groups is None:
+      groups = mp.config.GetString('manifest.groups')
     if groups:
       groups = self._ParseGroups(groups)
 
diff --git a/project.py b/project.py
index f964b2f..5d8f61e 100644
--- a/project.py
+++ b/project.py
@@ -1275,6 +1275,8 @@
         # Except if the head needs to be detached
         #
         if not syncbuf.detach_head:
+          # The copy/linkfile config may have changed.
+          self._CopyAndLinkFiles()
           return
       else:
         lost = self._revlist(not_rev(revid), HEAD)
@@ -1292,6 +1294,8 @@
     if head == revid:
       # No changes; don't do anything further.
       #
+      # The copy/linkfile config may have changed.
+      self._CopyAndLinkFiles()
       return
 
     branch = self.GetBranch(branch)
diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py
index e99affa..c243bb3 100644
--- a/subcmds/gitc_init.py
+++ b/subcmds/gitc_init.py
@@ -19,6 +19,7 @@
 
 import gitc_utils
 from command import RequiresGitcCommand
+from manifest_xml import GitcManifest
 from subcmds import init
 
 
@@ -34,7 +35,7 @@
 
 This command will setup the client directory, initialize repo, just
 like repo init does, and then downloads the manifest collection
-and installs in in the .repo/directory of the GITC client.
+and installs it in the .repo/directory of the GITC client.
 
 Once this is done, a GITC manifest is generated by pulling the HEAD
 SHA for each project and generates the properly formatted XML file
@@ -68,15 +69,16 @@
       os.mkdir(self.client_dir)
     super(GitcInit, self).Execute(opt, args)
 
-    for name, remote in self.manifest.remotes.iteritems():
-      remote.fetchUrl = remote.resolvedFetchUrl
-
+    manifest_file = self.manifest.manifestFile
     if opt.manifest_file:
       if not os.path.exists(opt.manifest_file):
         print('fatal: Specified manifest file %s does not exist.' %
               opt.manifest_file)
         sys.exit(1)
-      self.manifest.Override(opt.manifest_file)
-    gitc_utils.generate_gitc_manifest(self.client_dir, self.manifest)
+      manifest_file = opt.manifest_file
+
+    manifest = GitcManifest(self.repodir, opt.gitc_client)
+    manifest.Override(manifest_file)
+    gitc_utils.generate_gitc_manifest(None, manifest)
     print('Please run `cd %s` to view your GITC client.' %
           os.path.join(gitc_utils.GITC_FS_ROOT_DIR, opt.gitc_client))
diff --git a/subcmds/start.py b/subcmds/start.py
index 188fd7c..940c341 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -57,7 +57,6 @@
         print("error: at least one project must be specified", file=sys.stderr)
         sys.exit(1)
 
-    proj_name_to_gitc_proj_dict = {}
     if self.gitc_manifest:
       all_projects = self.GetProjects(projects, manifest=self.gitc_manifest,
                                       missing_ok=True)
@@ -67,7 +66,6 @@
         else:
           project.already_synced = False
           project.old_revision = project.revisionExpr
-        proj_name_to_gitc_proj_dict[project.name] = project
         project.revisionExpr = None
       # Save the GITC manifest.
       gitc_utils.save_manifest(self.gitc_manifest)
@@ -77,9 +75,10 @@
     pm = Progress('Starting %s' % nb, len(all_projects))
     for project in all_projects:
       pm.update()
+
       if self.gitc_manifest:
-        gitc_project = proj_name_to_gitc_proj_dict[project.name]
-        # Sync projects that have already been opened.
+        gitc_project = self.gitc_manifest.paths[project.relpath]
+        # Sync projects that have not been opened.
         if not gitc_project.already_synced:
           proj_localdir = os.path.join(self.gitc_manifest.gitc_client_dir,
                                        project.relpath)
@@ -89,7 +88,7 @@
           project.Sync_NetworkHalf()
           sync_buf = SyncBuffer(self.manifest.manifestProject.config)
           project.Sync_LocalHalf(sync_buf)
-          project.revisionExpr = gitc_project.old_revision
+          project.revisionId = gitc_project.old_revision
 
       # If the current revision is a specific SHA1 then we can't push back
       # to it; so substitute with dest_branch if defined, or with manifest
@@ -100,6 +99,7 @@
           branch_merge = project.dest_branch
         else:
           branch_merge = self.manifest.default.revisionExpr
+
       if not project.StartBranch(nb, branch_merge=branch_merge):
         err.append(project)
     pm.end()
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 2e9bbe7..a99d7e7 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -75,6 +75,7 @@
 from project import SyncBuffer
 from progress import Progress
 from wrapper import Wrapper
+from manifest_xml import GitcManifest
 
 _ONE_DAY_S = 24 * 60 * 60
 
@@ -670,32 +671,39 @@
       if opt.jobs is None:
         self.jobs = self.manifest.default.sync_j
 
-    # TODO (sbasi) - Add support for manifest changes, aka projects
-    # have been added or deleted from the manifest.
     if self.gitc_manifest:
       gitc_manifest_projects = self.GetProjects(args,
-                                                manifest=self.gitc_manifest,
                                                 missing_ok=True)
       gitc_projects = []
       opened_projects = []
       for project in gitc_manifest_projects:
-        if not project.old_revision:
-          gitc_projects.append(project)
+        if project.relpath in self.gitc_manifest.paths and \
+           self.gitc_manifest.paths[project.relpath].old_revision:
+          opened_projects.append(project.relpath)
         else:
-          opened_projects.append(project)
+          gitc_projects.append(project.relpath)
 
-      if gitc_projects and not opt.local_only:
+      if not args:
+        gitc_projects = None
+
+      if gitc_projects != [] and not opt.local_only:
         print('Updating GITC client: %s' % self.gitc_manifest.gitc_client_name)
-        gitc_utils.generate_gitc_manifest(self.gitc_manifest.gitc_client_dir,
-                                          self.gitc_manifest,
+        manifest = GitcManifest(self.repodir, self.gitc_manifest.gitc_client_name)
+        if manifest_name:
+          manifest.Override(manifest_name)
+        else:
+          manifest.Override(self.manifest.manifestFile)
+        gitc_utils.generate_gitc_manifest(self.gitc_manifest,
+                                          manifest,
                                           gitc_projects)
         print('GITC client successfully synced.')
 
       # The opened projects need to be synced as normal, therefore we
       # generate a new args list to represent the opened projects.
-      args = []
-      for proj in opened_projects:
-        args.append(os.path.relpath(proj.worktree, cwd))
+      # TODO: make this more reliable -- if there's a project name/path overlap,
+      # this may choose the wrong project.
+      args = [os.path.relpath(self.manifest.paths[p].worktree, os.getcwd())
+              for p in opened_projects]
       if not args:
         return
     all_projects = self.GetProjects(args,
