# Can't handle conflicts using docker

**URL:** <https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971>\
**Category:** General\
**Tags:** docker\
**Created:** [5 June 2023 18:22 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971 "2023-06-05T18:22:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [5 June 2023 18:22 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/1 "2023-06-05T18:22:30Z")

</div>

Hello! I'm developing a project with a bitbucket repository. No problem so far. I have a friend that got involved and wanna help. I shared the repo with him but I'm getting error on with branch conflict.

Expected behaviour:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/752344b630fb947d79b0bad1afcd097f8dbc217e.png)

My nodered shows:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c699387dd143523e8143ca683d92338d1adc9f5e.png)

When I hit close:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c814cb9f0a985825cd344af13ed834ea239a58b6.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf3485b9fd00f1215b81aff5596626b567e080fc.png)

I'm running in the latest docker 64 image. The log shows the following:

```auto
5 Jun 15:06:24 - [error] Error: hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

```

Help me please?

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [5 June 2023 20:59 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/2 "2023-06-05T20:59:29Z")

</div>

I found the problem, but not the solution. Just a workaround.

It seems that since git version 2.27.0, git dropped default behaviour.

> **[Git warning: Pulling without specifying how to reconcile divergent branches...](https://www.luizcorreia.eti.br/git-warning-pulling-without-specifying-how-to-reconcile-divergent-branches-is-discouraged/)**
>
> Git quer que escolhamos como ele deve lidar com a situação em que nosso branch remoto (por exemplo origin/develop) está fora de sincronia com nosso branch local ( develop).

I've added the default behaviour to the system and now it is working again.

```auto
git config --global pull.rebase false

```

However, this is not solved for new fresh docker. Any tips?

---

<div class="post-metadata">

**Author:** ![passadoreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/passadoreg/32/81170_2.png) [@passadoreg](https://discourse.nodered.org/u/passadoreg)\
**Post date:** [7 July 2023 19:50 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/3 "2023-07-07T19:50:06Z")

</div>

I'm facing the same issue, and cannot run the git config fix due to this error:

error: could not lock config file //.gitconfig: Permission denied

Any update?

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [10 July 2023 18:39 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/4 "2023-07-10T18:39:44Z")

</div>

I just solved my issue and stopped following the problem. I don't see how my fix suggestion is related to your command.

---

<div class="post-metadata">

**Author:** ![passadoreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/passadoreg/32/81170_2.png) [@passadoreg](https://discourse.nodered.org/u/passadoreg)\
**Post date:** [14 July 2023 18:34 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/5 "2023-07-14T18:34:24Z")

</div>

Is there anyway to resolve this in the docker image? I'm using NodeRed in Kubernetes, need to have an image that doesn't have this problem from scratch.

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [16 July 2023 12:57 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/6 "2023-07-16T12:57:18Z")

</div>

That should be handled by the repository.

---

<div class="post-metadata">

**Author:** ![passadoreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/passadoreg/32/81170_2.png) [@passadoreg](https://discourse.nodered.org/u/passadoreg)\
**Post date:** [16 July 2023 15:09 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/7 "2023-07-16T15:09:00Z")

</div>

Actually this can be handled by building your own image this way:

FROM nodered/node-red:latest

USER root

RUN git config --global pull.rebase false  
RUN git config --system pull.rebase false

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [16 July 2023 15:12 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/8 "2023-07-16T15:12:50Z")

</div>

Ok, I misunderstood your question. From scratch means that you can make your own build. Good to know that fixed to you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 September 2023 15:13 UTC](https://discourse.nodered.org/t/cant-handle-conflicts-using-docker/78971/9 "2023-09-14T15:13:34Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
