我如何解决 IntelliJ 中的 GIT 问题?我的 HEAD master* 节点是 "go over" 远程 origin/master

How can I solve this GIT issue in IntelliJ? My HEAD master* node is "go over" the remote origin/master

我正在开发一个项目,使用 IntelliJ 作为 IDE 和 GIT 作为存储库。

我有以下问题:

如您所见,我的 HEAD master 节点似乎是 "go over" 远程 origin/master我的中央存储库。

基本上,正如您在右侧框中看到的那样,我只添加了 Config.java 文件并修改了 pom.xml.

基本上我认为我必须以这种方式合并本地 HEAD master 和远程 origin/master 节点:

如何从 IntelliJ 解决这个问题?

根据您的评论,这里是 "fix" 需要遵循的命令:

我正在按照 CLI 中应有的方式编写命令,但您也可以从 IDE 中执行。

# commit all your changes 
# (looks like they are already commited based upon your scresnshot)

# switch to the your local master branch
git checkout master

# now pull all your changes from the remote. This will result in a local merge
git pull origin master

# now fix any conflicts if there are any and push your changes back to your remote.

以上命令的作用是什么?

您将远程更改合并到本地分支,然后将它们推回以便用您的更改更新远程。