2012-03-30 5 views
1

Ich habe vor einigen Monaten cvs2git ausgeführt und ein git-Repository für Code erstellt. Ich importierte von cvs auf einen dedizierten Server, den ich als Remote-Repository verwenden möchte.ein aus cvs2git erstelltes Repository in ein blankes Repository konvertieren

Heute habe ich zum ersten Mal versucht, aus dem Remote-Repository zu klonen und konnte erfolgreich klonen. Allerdings, wenn ich versuchte, Änderungen zurückzudrängen bis zur Remote-Repository, so scheint es, wie es nicht kahl ist, weil ich den Fehler:

remote: error: refusing to update checked out branch: refs/heads/master 
remote: error: By default, updating the current branch in a non-bare repository 
remote: error: is denied, because it will make the index and work tree inconsistent 
remote: error: with what you pushed, and will require 'git reset --hard' to match 
remote: error: the work tree to HEAD. 
remote: error: 
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to 
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into 
remote: error: its current branch; however, this is not recommended unless you 
remote: error: arranged to update its work tree to match what you pushed in some 
remote: error: other way. 
remote: error: 
remote: error: To squelch this message and still keep the default behaviour, set 
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. 

Nachdem die Erforschung, ich denke, das Problem ist, dass das Repository mich mit cvs2git erstellt ist nicht nackt.

Wie kann ich Änderungen an dieses Remote-Repository übertragen? Mein (begrenztes) Verständnis von Git ist, dass jeder Klon gleich ist, und es gibt nichts besonders "Besonderes" an der Kopie, die sich auf dem Remote-Repository befindet. Kann ich also löschen, was gerade da ist, ein neues blankes Repository erstellen und von meinem Remote-Client zurück in das Remote-Repository schieben?

Antwort

1

So can I delete what is currently there, create a fresh bare repository, and push from my remote client back up to the remote repository?

Ja, Sie können das tun - in der Tat wäre es wahrscheinlich der einfachste Weg.

Verwandte Themen