I created a git repo and updated it with some stuff. Later I created a new directory for this project and initialized new git for it. Now I want to push changes and replace the old ones in repo. When I do git push origin master I get

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com: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.