My friend and I are working on a project on GitHub.
He recently pushed code to the repo which I didn't have and I already wrote some code, which isn't pushed. Meaning, the repo on GitHub has his commit but my local repo doesn't have that commit, so it's a commit behind. But I've made some changes of my own to the local repo, which I don't want to lose.
Now I'm stuck, I can't push without removing his code, and I can't pull without removing my changes. So how do I keep both the changes? I've heard of merge, but I can't figure out how to get his commit and merge it with mine.
How do I keep both mine and his changes?