Re: git pull bug report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is nothing to reconcile since the branches have not diverged:
local is ahead of upstream. So I think it is a bug, no?

Best regards,
Erwin

On Mon, Nov 15, 2021 at 3:54 PM Bagas Sanjaya <bagasdotme@xxxxxxxxx> wrote:
>
> On 15/11/21 15.42, Erwin Villejo wrote:
> >> What did you do before the bug happened? (Steps to reproduce your issue)
> > * make local changes, stage, and commit
> > * local is ahead of upstream. confirmed by `git status`:
> >
> > ```
> > $ git status
> > On branch main
> > Your branch is ahead of 'github/main' by 1 commit.
> >    (use "git push" to publish your local commits)
> > ```
> >
> > * try to pull upstream to local
> >
> >> What did you expect to happen? (Expected behavior)
> > No-op (and NO failure) since local is ahead of upstream.
> >
> >> What happened instead? (Actual behavior)
> > `git pull` fails with error:
> >
> > ```
> > $ git pull
> > hint: You have divergent branches and need to specify how to reconcile them.
> > hint: You can do so by running one of the following commands sometime before
> > hint: your next pull:
> > hint:
> > hint:   git config pull.rebase false  # merge (the default strategy)
> > hint:   git config pull.rebase true   # rebase
> > hint:   git config pull.ff only       # fast-forward only
> > hint:
> > hint: You can replace "git config" with "git config --global" to set a default
> > hint: preference for all repositories. You can also pass --rebase, --no-rebase,
> > hint: or --ff-only on the command line to override the configured default per
> > hint: invocation.
> > fatal: Need to specify how to reconcile divergent branches.
> > ```
> >
> >> What's different between what you expected and what actually happened?
> > I expected no failure and no-op since local is ahead of upstream.
> > Instead, `git pull`
> > fails because it thinks the branches have diverged.
> >
> >> Anything else you want to add:
> > I found this bug in VSCode. VSCode runs `git pull` first before `git
> > push` when pushing to upstream.
> > This bug causes pushing via VSCode to always fail, although it can be
> > worked around by simply opening
> > a terminal and running `git push` manually.
>
> You need to do the prompt above, so not a bug.
>
> When reconciling, do you want merge or rebase?
>
> --
> An old man doll... just what I always wanted! - Clara



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux