{"thread":{"id":"54985","subject":"Bug report: git checkout introduces local changes","startedAt":"2021-01-13T22:56:14Z","lastAt":"2021-01-13T22:56:14Z","messageCount":1,"participants":["Anthony Miles"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"414291","messageId":"ME2PR01MB32490F1D7657C6B6854A3B82D9A90@ME2PR01MB3249.ausprd01.prod.outlook.com","threadId":"54985","inReplyTo":null,"subject":"Bug report: git checkout introduces local changes","fromName":"Anthony Miles","fromEmail":"anthony.miles@nab.com.au","sentAt":"2021-01-13T22:32:45Z","receivedAt":"2021-01-13T22:56:14Z","isPatch":false,"sender":{"key":"anthony.miles@nab.com.au","avatar":null},"body":"Background: (from memory)\nBranch A had a file X added to it\nBranch B had a copy of the file X added to it (in a different location)\nLater, Branch B was merged to branch A\n\nSteps:\n1. git checkout A\n  No local changes\n2. git checkout B\n  File X is deleted\n\nWhat did you expect to happen? (Expected behavior)\nChecking out a branch should not introduce local changes\n\nWhat happened instead? (Actual behavior)\nChecking out branch B introduced a local change, deleting File X\n\nAdditional information:\nSwitching back from branch B to branch A results in no local changes\n\n[System Info]\ngit version:\ngit version 2.29.2.windows.2\ncpu: x86_64\nbuilt from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Windows 6.1 7601\ncompiler info: gnuc: 10.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\npre-commit\npre-push\n\n\nThe information contained in this email and its attachments may be confidential.\nIf you have received this email in error, please notify the sender by return email,\ndelete this email and destroy any copy.\n\nAny advice contained in this email has been prepared without taking into\naccount your objectives, financial situation or needs. Before acting on any\nadvice in this email, National Australia Bank Limited (NAB) recommends that\nyou consider whether it is appropriate for your circumstances.\nIf this email contains reference to any financial products, NAB recommends\nyou consider the Product Disclosure Statement (PDS) or other disclosure\ndocument available from NAB, before making any decisions regarding any\nproducts.\n\nIf this email contains any promotional content that you do not wish to receive,\nplease reply to the original sender and write \"Don't email promotional\nmaterial\" in the subject.\n\n"}]}