既存のブランチ(master)があるとエラーが発生するため修正．
既存のブランチ(master)があるとエラーが発生するため修正．

diff --git a/kenja/committer.py b/kenja/committer.py
index 8423944..135d489 100644
--- a/kenja/committer.py
+++ b/kenja/committer.py
@@ -125,7 +125,11 @@ class SyntaxTreesCommitter:
         for head in self.org_repo.heads:
             hexsha = head.commit.hexsha
             if hexsha in self.old2new:
-                self.new_repo.create_head(head.name, commit=self.old2new[hexsha])
+                if head.name == 'master':
+                    master = self.new_repo.heads.master
+                    master.set_reference(self.old2new[hexsha])
+                else:
+                    self.new_repo.create_head(head.name, commit=self.old2new[hexsha])

     def create_tags(self):
         for tag_ref in self.org_repo.tags:

daiki1217/kenja,niyaton/kenja,daiki1217/kenja,yum-kvn/kenja,yum-kvn/kenja,niyaton/kenja-java-parser,niyaton/kenja