In your screen shot you can see 3 commits, two commits are connected, test and remove test, but then your newest commit does not have a parent, hence no related histories.
origin/master
has no useful code) Judging by the commit messages, you have an empty repo before your latest commit. In this situation, I would force replace what is on remote by doing git push -f
.
Please note this will delete the commits labeled test
and remove test
.
origin/master
) Use git cherry-pick
those commits into your local master. Always do this oldest to newest.
git cherry-pick <commit hash>
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.