[Please I need help, I have been battling with rebasing conflict, the problem is after doing a git rebase origin/master, the rebase gave me an error which I resolved the conflict manually on my code editor by accepting incoming changes, I did a git rebase --continue, git commit --amend ], it showed me a vim editor which I resolved. Then type git push origin master and its giving me an error. What could be the problem here 1
Asked
Active
Viewed 33 times
-1
-
1Welcome to Stack Overflow! Certain questions here are more likely to get helpful answers. Questions that share code as images instead of code blocks usually indicate you haven't read [How to Ask](https://stackoverflow.com/questions/how-to-ask), and people often skip right over them. So share your code as indicated. If you encounter a specific technical problem during that attempt, we can help with that, and we want to - that’s part of why we’re here. If you’re really ambitious, read the [tour](https://stackoverflow.com/tour). – Don Branson Dec 08 '21 at 19:08
-
https://stackoverflow.com/search?q=%5Bgit%5D+Updates+were+rejected+because+a+pushed+branch+tip+is+behind+its+remote+counterpart – phd Dec 08 '21 at 19:24
1 Answers
1
To push to a remote with rewritten history you need to do git push -f
if you want more information about git rebase
the git docs are useful.
the normal way of rebasing a conflict is:
git add /path/to/conflicting/file
git rebase --continue
check code
if the code works:
git push -f
else fix code
Note: push -f
will overwrite any different commits in the remote

Jesse Taube
- 402
- 3
- 11
-
oh thanks very much, I think what I missed to add was ,git add. before git rebase --continue. This was helpful – user15696856 Dec 09 '21 at 16:24