I am getting this message while pushing to github repository. Can you tell me step by step procedure to fix it? I pushed only once and it was successful. But, when I updat
Applicable for Eclipse Luna + Eclipse Git 3.6.1
I,
And I faced this issue with EGit and here is how I fixed it..
Yes, someone committed the changes before I commit my changes. So the changes are rejected.
After this error, the changes gets actually committed to local repository.
I did not want to just Pull the changes because I wanted to maintain linear history as pointed out in - In what cases could `git pull` be harmful?
So, I executed following steps
Fetch from Upstream - it fetches remote updates (refs and objects) but no updates are made locally. for more info refer What is the difference between 'git pull' and 'git fetch'?Rebase... - this open a popup, click on Preserve merges during rebase see whyRebase buttonconflict(s), go to step 6 else step 11Rebase Result popup would appear, just click on OKfile comparator would open up, you need to modify left side file. Git Staging viewstage the changes. i.e. add to indexRebase-> Continue. repeat 7 to 10 until all conflicts are resolved.History view, select your commit row and select Push CommitRebase Commits of local....... checkbox and click next. refer why - Git: rebase onto development branch from upstreamFinishNote: if you have multiple local repository commits, you need to squash them in one commit to avoid multiple merges.