13
Qual è la differenza tra fare:git push -f vs. +
git push -f origin my-branch:my-branch
e
git push origin +my-branch:my-branch
?
Qual è la differenza tra fare:git push -f vs. +
git push -f origin my-branch:my-branch
e
git push origin +my-branch:my-branch
?
Queste sono due sintassi per lo stesso obiettivo.
Solo che git push --force
può essere utilizzato quando si non si specificare alcun refspec (il che significa che si vuole spingere il vostro ramo corrente a un nome del ramo corrispondente a distanza).
è più facile che:
git push origin +yourBranch
, come indicato nel Git Community Book.
Vedere "Why “git push helloworld +master:master” instead of just “git push helloworld”?" per illustrazione.