简体   繁体   中英

How can I push the newest version of my project to the repo?

I'm working on a small React project and have pushed its old version to the GitHub a couple days ago to this repo: Old repo

Since that time, I've made multiple changes to my project, so I decided to create a new repo and push the latest version of the app there.

The problem is that the old version of the project has been pushed to my new repo, I don't understand why. Can you help me to resolve this?

Please, tell me what is the mistake - why I'm pushing the old version of my app that even not exists on my computer?

Here is a link to my new repo: New repo

Steps I've made in Windows Powershell to push the project to new repo:

You're still in the middle of a rebase. It stopped rebasing since there was/are conflicts.

Please fix your conflicts. Then run git add -A && git commit -am "your message here" After that you need to continue your rebase by using: git rebase --continue

If all went well you rebased your branch and are able to push the changes with git push -f . This will force push your branch since you've diversed from remote.. as @vincentm already said be warned since you're changing the history line.

You could use --force to overwrite the remote code. ( git push --force origin master )

Use it with caution (your repo is new, so i think it's not a problem, but avoid it on a repo with hundreds of commits :-) ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM