git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Anthony Miles <Anthony.Miles@nab.com.au>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Bug report: git checkout introduces local changes
Date: Wed, 13 Jan 2021 22:32:45 +0000	[thread overview]
Message-ID: <ME2PR01MB32490F1D7657C6B6854A3B82D9A90@ME2PR01MB3249.ausprd01.prod.outlook.com> (raw)

Background: (from memory)
Branch A had a file X added to it
Branch B had a copy of the file X added to it (in a different location)
Later, Branch B was merged to branch A

Steps:
1. git checkout A
  No local changes
2. git checkout B
  File X is deleted

What did you expect to happen? (Expected behavior)
Checking out a branch should not introduce local changes

What happened instead? (Actual behavior)
Checking out branch B introduced a local change, deleting File X

Additional information:
Switching back from branch B to branch A results in no local changes

[System Info]
git version:
git version 2.29.2.windows.2
cpu: x86_64
built from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 6.1 7601
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]
pre-commit
pre-push


The information contained in this email and its attachments may be confidential.
If you have received this email in error, please notify the sender by return email,
delete this email and destroy any copy.

Any advice contained in this email has been prepared without taking into
account your objectives, financial situation or needs. Before acting on any
advice in this email, National Australia Bank Limited (NAB) recommends that
you consider whether it is appropriate for your circumstances.
If this email contains reference to any financial products, NAB recommends
you consider the Product Disclosure Statement (PDS) or other disclosure
document available from NAB, before making any decisions regarding any
products.

If this email contains any promotional content that you do not wish to receive,
please reply to the original sender and write "Don't email promotional
material" in the subject.


                 reply	other threads:[~2021-01-13 22:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ME2PR01MB32490F1D7657C6B6854A3B82D9A90@ME2PR01MB3249.ausprd01.prod.outlook.com \
    --to=anthony.miles@nab.com.au \
    --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).