Git development
 help / color / mirror / Atom feed
From: Andreas Krey <a.krey@gmx.de>
To: git@vger.kernel.org
Subject: 'untracked working tree files would be overwritten by merge' on ignored files?
Date: Tue, 14 Jun 2016 18:07:20 +0200	[thread overview]
Message-ID: <20160614160720.GA22675@inner.h.apk.li> (raw)

Hi all,

when I have an ignored file in my workspace, is git
then also assumed not to remove it in the course
of a merge?

Shouldn't it then say that the file is ignored,
as it does not show up in the untracked section
of git status?

Regards, Andreas

PS: Test script (will remove anything named 'tst'):
    rm -rf tst
    mkdir tst
    cd tst || exit 1
    git init
    echo '*.txt' >.gitignore
    git add .
    git commit -m initial
    git checkout -b side
    git checkout -
    date >a.txt
    git add -f a.txt
    git commit -m 'new file'
    git checkout side
    git commit -m 'nix' --allow-empty
    touch a.txt
    git status --ignored    # Shows a.txt as ignored
    git merge master        # Will complain
    git version

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

             reply	other threads:[~2016-06-14 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 16:07 Andreas Krey [this message]
2016-06-14 17:06 ` 'untracked working tree files would be overwritten by merge' on ignored files? Junio C Hamano
2016-06-14 21:35   ` Andreas Krey

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

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

  git send-email \
    --in-reply-to=20160614160720.GA22675@inner.h.apk.li \
    --to=a.krey@gmx.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox