Thanks to you both for your patience with me. Sorry for the late reply, my day
job was needing me ;-)
On Fri, Dec 15, 2017 at 07:58:14PM +0100, Igor Djordjevic wrote:
> On 15/12/2017 17:33, Junio C Hamano wrote:
> >
> > $ git fetch <remote> <branch>
> > $ git checkout -m -B <master> FETCH_HEAD
For some reason, this seems to double the local modifications. After executing
the following commands:
rm -rf reposA reposB
git init reposA
(
cd reposA
echo 1 >>1
echo 2 >>2
git add 1 2
git commit -m1
)
git clone reposA reposB
(
cd reposA
echo 1 >>1
git commit -a -m2
)
(
cd reposB
echo 3 >>2
git fetch
git checkout -m -B master FETCH_HEAD
)
git-diff gives me:
$ diff --git a/2 b/2
index 0cfbf08..4e8a2de 100644
--- a/2
+++ b/2
@@ -1 +1,3 @@
2
+3
+3
With Igor's set of commands, I did not see this doubling:
> git checkout -b temp && #1
> git fetch && #2
> git branch -f master origin/master && #3
> git checkout -m master && #4
> git add -u && #5
> git reset && #6
> git branch -d temp #7
> ... aaand that`s how you do it[1] without a temporary branch :)
>
> Junio, what about consecutive runs, while merge conflicts are still
> unresolved?
>
> Seeing Josef having a pretty relaxed flow, and his cron job running
> every 15 minutes, would adding something like:
>
> $ git add -u
> $ git reset
This would be added after the "git checkout -m -B master FETCH_HEAD" command?
> ... to the mix, to "silence" actually still unresolved merge
> conflicts, making next script execution possible, make sense?
>
> Yes, `git diff` won`t be the same as if conflicts were still in, but
> it might be worth it in this specific case, conflicting parts still
> easily visible between conflict markers.
That means, the conflict is still there, but git would think this is an
ordinary modification?
--
Josef Wolf
[email protected]