Nel mio repository, ho un ramo master
e un ramo new
.! [rifiutato] master -> master (non veloce) in un nuovo ramo aggiornato
Ho lavorato su new
per un po ', facendo commit e spingo mentre vado. Ho deciso ora di diramare lo new
e chiamarlo newest
. Così ho fatto
git checkout -b "newest"
e il ramo è stato creato con successo. Ho aggiunto un file e ho iniziato a lavorarci. Ho effettuato i miei cambiamenti un paio di volte.
ma quando provo a spingere questo nuovo ramo e le mie modifiche ad esso per origin
, ottengo questo errore:
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: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Così, come specificato nelle istruzioni, ho provato git pull
, ma poi mi sono:
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
mi sono bloccato.
Come si invia il nuovo ramo e le modifiche a github
?