En mi repository, tengo una twig master
y una new
twig.
He estado trabajando en algo new
por un time, haciendo commits, y empujando sobre la marcha. Decidí ahora separarme de new
y llamarlo más newest
. Así que lo hice
git checkout -b "newest"
y la twig fue creada con éxito. Agregué un file y comencé a trabajar en él. Cometí mis cambios un par de veces.
PERO cuando trato de empujar esta nueva twig y mis cambios a su origin
, obtengo este error:
C:\wamp\www\myproj>git push origin To https://github.com/Imray/Proj.git ! [rejected] master -> master (non-fast-forward) ! [rejected] new -> new (non-fast-forward) error: failed to push some refs to 'https://github.com/Imray/Proj.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (eg 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Entonces, como se especifica en las instrucciones, probé git pull
, pero luego obtuve:
There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> newest
Estoy atascado.
¿Cómo github
mi nueva twig y los cambios en github
?
Comtesting tu git config push.default
. Puede ser en " matching
", ya que intenta impulsar todas las twigs existentes.
Ese fue el valor pnetworkingeterminado antes de Git 2.0+ .
Yo recomendaría establecerlo en " simple
", para empujar solo la twig actual.
Dicho esto, para impulsar una twig, necesita (para el primer empuje) configurar una twig ascendente .
Para una twig nunca empujada antes:
git push -u origin newest
Para una twig que sí existe en el repo ascendente :
git branch --set-upstream-to=origin/master master git branch --set-upstream-to=origin/new new
Luego un git checkout master ; git pull would
git checkout master ; git pull would
funcionaría.
testing esto :
Espero eso ayude