git remote repository contains commits unmerged into the local branch

我是研究僧i 提交于 2019-11-30 01:47:46

I read the error message once again and thought that I should merge the local branch into remote branch. I looked around in the IDE to find these options. I got lucky when I tried: Project > right click > Git > repository browser.

The following window opens up:

Steps:

  1. Remote branch > right click > merge revision. Then you will see the hash of remote next to local.

  2. Project > Right click > Git > Remote > Push. This will push your local branch code to remote repo.

Realize a pull. Then a window with the option 'merge' will appear. Do a merge and try to push it again.

Sorry for my english level

Don’t use git pull, use git fetch, then git merge, then git commit and then git push.

FYI: http://longair.net/blog/2009/04/16/git-fetch-and-merge/

Right click your project > Git > Remote > fetch Right click your project > Git > Branch/ tag > Merge Revision Click merge Now u should be able to do the push...

If you can not see the file under remote in the git repository browser then first you need to pull in order to solve the above problem.
Steps:
1.Right click project > Git > Remote > Pull > then select merge option.
2.Right click project > Git > Remote > Push.
The problem should be solved by now :-)

I would delete the repository. Recreate the repository. Please don't commit anything. Then push it after adding and committing inside NetBeans. Remember, you can create README.md, anything later.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!