Reputation: 410
I have a problem with Git and Github. So:
1.I pushed a commit from other device
2.On local machine, I forgot to do git pull
3.Made changes to files
4.Made a commit, and tried to push, but git complained about refs
5.So I tried git fetch, and then git pull but it complained about conflict files.
6.Then I tried git pull --rebase and then git rebase --skip.
7.After that, I tried git pull --ff-only
8.Now Git refuses to "see" all changes I made on step 3
What I should do?
Upvotes: 0
Views: 32
Reputation: 5776
Your problem started when you ran git rebase --skip
. That told Git to ignore the commit that had conflicts.
To fix this, go back to the state before the rebase. Do a git reflog
and look for the entry right before the rebase, then do a git reset --hard
to that commit.
Now run the rebase again, but instead of skipping, try to resolve the conflicts you had. Then git add
the file with conflicts, and do git rebase --continue
.
Upvotes: 1