Commits

Christian Specht committed 8b7dc93

create bare local repositories, pull all existing branches

Source: http://stackoverflow.com/q/7895798#7895827

  • Participants
  • Parent commits a1d0c76

Comments (0)

Files changed (1)

src/BitbucketBackup/GitRepository.cs

 
             if (!Directory.Exists(Path.Combine(this.folder, ".git")))
             {
-                this.git.Execute("init");
+                this.git.Execute("init --bare");
             }
         }
 
 
         public override void Pull()
         {
-            this.git.Execute("pull " + this.remoteuri + " --bare");
+            this.git.Execute("fetch " + this.remoteuri + " refs/heads/*:refs/heads/*");
         }
     }
 }