I’m working with a friend using github and eclipse. Initially he created the repository and pushed his code. The only way I’m able to push my changes are to “force” them but this unfortunately wipes out his data and replaces it with mine. If I uncheck the force option I see the following error when trying to push my changes:
master: master [rejected]
Do I need to start over and pull the source from the repository initially?
Before pushing your changes, you will need to merge his changes locally. Try:
After you have performed this merge and resolved any conflicts, you should be able to push your changes back up to Github.
The reason your change is rejected is that the current
masteron Github does not appear anywhere in the history of yourmasterbranch.