git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Josef Wolf <jw@raven.inka.de>
To: git@vger.kernel.org
Subject: Re: Need help migrating workflow from svn to git.
Date: Wed, 20 Dec 2017 12:43:37 +0100	[thread overview]
Message-ID: <20171220114337.GE18542@raven.inka.de> (raw)
In-Reply-To: <19d67f01-5e7d-3792-52f4-52da86bca5e5@gmail.com>

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
jw@raven.inka.de

  parent reply	other threads:[~2017-12-20 11:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 13:09 Need help migrating workflow from svn to git Josef Wolf
2017-12-14 21:07 ` Randall S. Becker
2017-12-15 10:27   ` Josef Wolf
2017-12-14 22:27 ` Igor Djordjevic
2017-12-15  1:17   ` Igor Djordjevic
2017-12-15 13:06     ` Josef Wolf
2017-12-15 12:47   ` Josef Wolf
2017-12-15 18:24     ` Igor Djordjevic
2017-12-15 16:33 ` Junio C Hamano
2017-12-15 18:58   ` Igor Djordjevic
2017-12-15 19:09     ` Junio C Hamano
2017-12-15 19:20       ` Igor Djordjevic
2017-12-20 11:52       ` Josef Wolf
2017-12-20 11:43     ` Josef Wolf [this message]
2017-12-20 12:19       ` Josef Wolf
2017-12-21 22:04       ` Igor Djordjevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171220114337.GE18542@raven.inka.de \
    --to=jw@raven.inka.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).