Ho creato un repository git e l'ho aggiornato con alcune cose. Più tardi ho creato una nuova directory per questo progetto e ho inizializzato il nuovo git per questo progetto. Ora voglio spingere i cambiamenti e sostituire quelli vecchi in repo. Quando faccio git push origin master
ottengoCome sostituire git repo?
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:Username/repo2.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
Cosa posso fare?
correlati: http://stackoverflow.com/questions/8461528/replace-github-repo-while-preserving-issues-wiki-etc –