From: D. Ben Knoble Date: Tue, 14 Jul 2026 22:27:42 GMT Subject: Re: local mistake - need help in recover Message-ID: In-Reply-To: > Le 14 juil. 2026 à 00:06, N.S Kishore a écrit : >  > Hi Team, > Need help to recover files from local mistake. > Regards, > Kishore N S. > After merge (and/or related operations in the same session), staged files disappeared from the index I could only slightly reproduce the issue reported: git init foo && cd foo echo a >a && git add a && git commit -ma echo a >>a && git commit -am aa git switch -c b HEAD~ echo b >b && git add b && git commit -mb echo b >>b && git add b echo b >>b From here, « git merge main » refuses (« Your local changes to the following files would be overwritten by merge »). With autostash mode, the merge succeeds, but the staged line of b is now unstaged. The working tree contents were not lost, though. In retrospect, I didn’t try with new files on the side branch. Test performed with Git 2.53.0 and repeated with 2.55.0.rc0.738.g0c8ab3ebcc.dirty.