Pro Git

Pro Git

🎯 ¿Cansado de los anuncios?
Elimínalos ahora 🚀
$ git p4 sync git p4 sync Performing incremental import into refs/remotes/p4/master git branch Depot paths: //depot/www/live/ Import destination: refs/remotes/p4/master Importing revision 12142 (100%) $ git log --oneline --all --graph --decorate * 75cd059 (p4/master, p4/HEAD) Update copyright | * 018467c (HEAD, master) Change page title | * c0fb617 Update link |/ * 70eaf78 Initial import of //depot/www/live/ from the state at revision #head

Parece que sí, ya que master y p4/master han divergido. El sistema de ramificación de Perforce es nada similar al de Git, por lo que enviar commits de fusión no tiene ningún sentido. Git-p4 recomienda que haga rebase de sus commits, e incluso viene con un atajo para hacerlo:

$ git p4 rebase Performing incremental import into refs/remotes/p4/master git branch Depot paths: //depot/www/live/ No changes to import! Rebasing the current branch onto remotes/p4/master First, rewinding head to replay your work on top of it... Applying: Update link Applying: Change page title index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Probablemente pueda parecer simple desde la salida, pero git p4 rebase es un atajo para` git p4 sync` seguido de git rebase p4/master. Es un poco más inteligente que eso, especialmente cuando se trabaja con múltiples ramas, pero esta es una buena aproximación.


👉 Descargar el audiolibro GRATIS en Amazon
Reportar problema / Sugerencias
🧠 Hacer Trivia

eXTReMe Tracker