2

I wonder, why I see this commit in TFS:

enter image description here

Here's what I've done:

  1. I have changed these files

my commit

  1. Meanwhile another developer made commit (94feaf removed literal types from workflow/identity query as this comes from) and pushed it

another commit

  1. I have commited the changes localy (
    commit a7de7a default value for root, ignored empty criteria) and clicked sync button in VS code. Sync does pull and push.

  2. Why there is a commit bcbb87 Merge branch 'master' with exactly the same changes like 94feaf?

    merge commit

Liero
  • 25,216
  • 29
  • 151
  • 297

1 Answers1

1

As commented, you would need a pull --rebase for avoid those merges.

But, as detailed in this feature request:

The "sync" button should respect the standard pull rebase setting for its default:

git config --global pull.rebase true 

But it does not:

On our repo, we set option pull.rebase = true.
But inside Visual studio, it does a merge instead of a rebase as expected.
Please fix it.

Current situation:

git rebase is supported in Visual Studio 2015

The feature can be found under the “branches” panel of the team explorer.

But:

I'm not really sure to understand the reason behind "having a separate gesture for pull and pull --rebase".
I'll probably speak in the name of most developers: we expect something simple and clear. We all expect the "Sync" button to make a pull then a push. And we all expect that the pull command take into account the settings we set for our repos whether it's a merge or rebase.


Since Git 2.9, I would recommend:

git config pull.rebase true
git config rebase.autoStash true

But again, those settings are not yet fully supported in Visual Studio.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250