I was working on a project by myself and got the merge conflict error. Here's what happened.
- First, I created a repository for the project
- I've been updating the repo alone without any collaborators
- I've been updating the changes by git add . -> git commit -> git push origin master.
- There's only one branch, master. (origin/master.) The project exists only in the repository and my machine.
Few days ago, I tried to do my usual update but encountered a merge conflict error. I think it is because I've added readme.md and other stuff to the repository (in github) and committed some changes locally but not pushing it to the repo. Still not clear why it happened though.
What I want to do is, the code in the machine (local changes) is up to date. I don't care about the changes occurred in the repo because it's outdated. Just want to update the repository with the changes committed locally.
I was researching about this and it seems like git rebase or git pull --rebase are the possible options. In this case, which one will be more suitable for me? Are those even the right for me?
Thank you