Locally I made changes in the project. Locally I commited them. When trying to push them to Github I found out somebody else commited changes to the repo before me. So git push will result in remote contains work that you do not have locally.
How do I pull changes and integrate them into my local repo (without losing my commit)? So I can push my commit?
@andyandy If it’s all in the same branch then you need to rebase your changes on top of what’s been committed, and resolve any conflicts between yours and the other person’s work.
This is why it’s a good idea to use branches and propose changes to a “main” branch using pull requests.
So if I understand it correctly, while in the branch I will git pull --rebase which will download remote changes and put my local commit on top of that? And then I will be able to git push my changes.