2010-12-14 14 views
8
git version 1.7.1 
svn, version 1.6.12 
Ubuntu 10.10 

Ho appena git e ho usato svn. Ma non ho usato poi insieme. Ho avuto un repository git, e ho dovuto più il mio repository a uno di sovversione. Quindi ho usato git-svn. Che funziona bene, il più delle volte. Tuttavia, trovo andare in tondo.git-svn rebase e problema dcommit

Sono l'unico a lavorare su questo progetto.

Apporto alcune modifiche al mio ramo. Ho poi in scena loro:

git stage gateway.c 

Poi li impegnano a livello locale per git:

git commit m"Made some changes" 

allora voglio a loro impegnarsi per sovversione. Ricevi gli ultimi aggiornamenti:

git svn rebase 

Allora ottengo il seguente messaggio:

It seems that I cannot create a rebase-apply directory, and 
I wonder if you are in the middle of patch application or another 
rebase. If that is not the case, please 
     rm -fr /home/joe/projects/gateway/.git/rebase-apply 
and run me again. I am stopping in case you still have something 
valuable there. 
rebase refs/remotes/trunk: command returned error: 1 

I then doing the following: 
rm -fr /home/joe/projects/gateway/.git/rebase-apply 

Poi faccio di nuovo un rebase:

git svn rebase 

Il messaggio è questo:

First, rewinding head to replay your work on top of it... 
Applying: Issue with getting the port from the user context. 
Using index info to reconstruct a base tree... 
Falling back to patching base and 3-way merge... 
Auto-merging driver.c 
Auto-merging gateway.c 
CONFLICT (content): Merge conflict in gateway.c 
Failed to merge in the changes. 
Patch failed at 0001 Issue with getting the port from the user context. 

When you have resolved this problem run "git rebase --continue". 
If you would prefer to skip this patch, instead run "git rebase --skip". 
To restore the original branch and stop rebasing run "git rebase --abort". 

rebase refs/remotes/trunk: command returned error: 1 

Che mi mette su un ramo chiamato, e w cappello è questo ramo e a cosa serve ?:

*(no branch) 

Quindi ho risolto i conflitti su quel ramo. Quindi eseguo il checkout del mio ramo play_video. Provo a farne un altro:

svn git dcommit 

E finisco di nuovo in circolo.

Prima di iniziare tirando fuori i miei capelli, può alcuni mi offrire alcuni consigli,

Molte grazie per qualsiasi suggerimento,

+0

avendo lo stesso problema qui ... quasi 3 anni e nessun suggerimento ... – Quartz

risposta

3

Non una risposta completa, ma quello che sembra certo è che:

*(no branch) 

significa che si finisce in una modalità DETACHED HEAD che si vede in un contesto svn git in "Can I recover lost commits in a SVN repository using a local tracking git-svn branch?".
Vedere anche "Why did git detach my head?".

Quindi assicuratevi:

  • ad ogni passo non si è in una testa staccata (nessun ramo)
  • che si dcommit un ramo che esiste nel vostro repo SVN (e non una filiale locale puro Git
+0

Grazie per il vostro aiuto. Sto verificando questo. – ant2009

+0

mi sono trovato bloccato qui e ho provato a fare un sacco di diversi comandi git, ma alla fine ho lanciato git svn dcommit prima di riuscire a fondere ulteriormente svn. – hellatan

+0

@dtan: c'è qualche problema o messaggio di errore con cui avresti bisogno di aiuto? – VonC

1

Hai utilizzato le istruzioni di Google here per importare il tuo repository git su svn? Ho avuto un errore simile dopo aver usato quelle istruzioni: l'importazione iniziale è andata bene, ma qualcosa è andato storto da qualche parte lungo la linea e non ho potuto spingere i successivi commit.

L'ho risolto solo con git svn init -in un nuovo repository git per tracciare il mio repository SVN.

1

Dopo aver risolto i tuoi conflitti è necessario eseguire prima di eseguire git rebase --continuegit svn dcommit

+0

git rebase --continue dice solo che non c'è nulla da impegnare. – Quartz