Possible Duplicate:
Github first push problem… how to merge remote changes?
My external repo is fairly outdated. I want to push all my local changes up stream. However, when I attempt to do so I get the following message...
error: failed to push some refs to 'ssh://mylink'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.
I don't want to pull because if I do those external changes will mess up my local changes. How do I override the external?
Navigate to the repository you just cloned. Pull in the repository's Git Large File Storage objects. Mirror-push to the new repository. Push the repository's Git Large File Storage objects to your mirror.
Amended force pushThe --force option must be used to push an amended commit. The above example assumes it is being executed on an existing repository with a commit history. git commit --amend is used to update the previous commit. The amended commit is then force pushed using the --force option.
Yes, by adding a remote and cherry-picking the commits on top of your first commit. The rest of this answer is if you still want to add the LICENSE to your previous repo. Yes. You can place your LICENSE commit as the first commit by rebasing.
If server detects a conflict when someone pushes data (and if two users are doing this "simultaneously" one of the pushes will be conflicting, because it will be applied only after the other one completes), the server will reject it, and the unlucky user shall then resolve conflicts and try to push again.
git push --force remoterepository
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With