git push origin testing To git@git.site.com: cgp / project.git
! [rejected] testing -> testing (non-fast-forward)
error: failed to push some refs to 'git@git.site.com: cgp / project.git'
hint: Updates were rejected because of a remote branch
hint: counterpart. Check out this branch and integrate the remote changes
hint: (eg 'git pull ...') before pushing again.
hint: See the git push - help for the details.
How to push?
From master'a last changes are poured into my branch of development. I created my own for development, I upload it to a remote branch for testing.
git push -fcommand. Before that, just in case, I make a backup of the.gitfolder in the local repository, since the history of commits can be deleted (but it should not, once it was only).git pull, as everyone here advises, will overwrite files on your local repository, files from a remote one having the same names and paths, so I do not usegit pullon this error. Thank. - Sasha Chernykhgit push -fthoughtlessly. Secondly, for anygit pushlocal history cannot be removed, local copies of remote branches can only be rewritten, but you see, you want to do this. Thirdly,git pulldoes not "rewrite files", it adds a new commit history without deleting the existing one. - Roman