Re: [PATCH v2 2/5] doc: git-checkout: clarify `git checkout <branch>`
- From
Julia Evans <julia@jvns.ca>
- Date
- Sep 2, 2025, 17:16 UTC
- Message-ID
- <2b00569b-bdc9-43e1-8a59-540d13c41a7a@app.fastmail.com>
- In-Reply-To
- <xmqqv7m6nmhz.fsf@gitster.g>
Show 7 quoted lines
> The condition to stop you is a bit stronger than that. > > By default, we would not even attempt to "merge into the branch" at > all. If your previous HEAD and the branch you are switching to are > different at a path you have local modifications in, then no changes > will be made and the checkout will fail. With "-m", we try to merge > and this merge can leave conflicts for you to sort out.
Thanks, I wasn't sure based on the existing text what "modifications are kept" meant exactly, and I've always been slightly hazy about this behaviour. Will fix.