Solo estoy tratando de trabajar en una nueva característicaA, pero me gustaría estar al día con las confirmaciones provenientes de Origin / Master. ¿Funcionará lo siguiente? ¿Es la mejor manera de hacerlo?
git clone ssh://xxx/repo git branch --track featureA origin/master [do work on featureA and commit] git commit -m"all changes made in featureA" git push
día a día trabajo:
git pull (pull the latest from origin/master) [merge the new commits coming from origin/master with my local featureA changes] git commit -m"resolved conflicts" git push origin/featureA
Cuando el time está listo para combinar featureA en master:
git checkout master git merge featureA git push origin/master
suena bien?
git checkout -b featureA origin/master #create the branch git push origin featureA #push it up and track it
Actualice el maestro de forma independiente. Ni siquiera necesita verificarlo si no cometió ningún error (incluidas las fusiones de su function):
git fetch git push . origin/master:master
Ahora, si desea include esos últimos cambios, puede
git merge master
Cuando desee include sus cambios en el maestro
git checkout master git merge featureA git push origin master #to send that up
No usaría pull como normalmente me gustaría ver lo que se obtuvo con git fetch
y luego actuar en consecuencia con una combinación o rebase o lo que sea.