From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Fedor Biryukov <fedor.birjukov@gmail.com>, git@vger.kernel.org
Subject: Re: Aborting 'rebase main feat' removes unversioned files
Date: Sat, 4 Sep 2021 13:57:11 +0700 [thread overview]
Message-ID: <dbe7d88d-4174-e080-03df-e35d0ac6004f@gmail.com> (raw)
In-Reply-To: <C357A648-8B13-45C3-9388-C0C7F7D40DAE@gmail.com>
On 04/09/21 03.33, Fedor Biryukov wrote:
> Looks like a bug in git rebase main feat.
>
> To reproduce:
> git init
> git commit -m 'init' --allow-empty
> git checkout -b feat
> echo 123 > readme.txt
> git add readme.txt
> git commit -m 'txt=123'
> git checkout main
> echo 012 > readme.txt
> git rebase main feat
> git rebase --abort
>
Did you forget committing?
> Expected result:
> readme.txt contains 012
>
> Actual result:
> readme.txt contains 123
>
> According to the docs, git rebase main feat is a shorthand for git checkout feat followed by git rebase main. I have checked that doing checkout and rebase separately instead of using the shorthand does not have the same issue.
I think this is non-issue (behavior as intended).
So when you say `git rebase main feat`, Git will rebase your commits in
feat on top of main. If any conflicts occur and you abort rebasing (`git
rebase --abort`), your feat branch just looks like before rebasing.
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2021-09-04 6:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAG2t84Uaw-Kdp+EXU8CY1QYfykFQj-hGLJnTSH8MYO8Vi_yqgA@mail.gmail.com>
2021-09-03 20:33 ` Aborting 'rebase main feat' removes unversioned files Fedor Biryukov
2021-09-04 6:57 ` Bagas Sanjaya [this message]
2021-09-04 9:48 ` Jeff King
2021-09-04 9:51 ` Fedor Biryukov
2021-09-04 9:58 ` Fedor Biryukov
2021-09-04 10:03 ` Fedor Biryukov
2021-09-04 10:24 ` Jeff King
2021-09-04 18:32 ` Fedor Biryukov
2021-09-04 10:18 ` Jeff King
2021-09-05 5:32 ` Elijah Newren
2021-09-05 7:43 ` Ævar Arnfjörð Bjarmason
2021-09-05 10:05 ` Fedor Biryukov
2021-09-08 0:40 ` Elijah Newren
2021-09-05 22:31 ` Junio C Hamano
2021-09-08 0:41 ` Elijah Newren
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=dbe7d88d-4174-e080-03df-e35d0ac6004f@gmail.com \
--to=bagasdotme@gmail.com \
--cc=fedor.birjukov@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).