2014-05-22 12 views
6

Nonostante si stia allontanando dal master remoto e venga detto che tutto è aggiornato, non posso inviare al master remoto perché il ramo corrente è dietro la punta del telecomando. Che cosa?Perché la punta del ramo dietro al suo telecomando?

$ git pull origin master 
From https://github.com 
* branch   master  -> FETCH_HEAD 
Already up-to-date. 
$ git push origin master 
To https://github.com 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to 'https://github.com' 
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: (e.g. 'git pull ...') before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 
+0

È possibile visualizzare lo stato del repository? usando 'git status' – benzonico

+0

Prova anche un 'git merge origin/master'? – Sam

+1

Sei in una modalità staccata? (http://stackoverflow.com/a/3965714/6309) – VonC

risposta

1

Si è probabilmente in una filiale diversa. git checkout master e prova.

+2

Stai attento a questo. git checkout master può sovrascrivere le modifiche se non vengono spinte –

+0

Mano potresti voler mettere una nota evidenziata per indicare cosa ha detto @Ev. Perché tutto il mio lavoro è andato in malora .. – Gokigooooks

+1

Questo l'ha risolto per me. –

Problemi correlati