3

I have created a new branch in Visual Studio 2017 from another branch in Git. Say 2.0.0. How do I know sometime in the future that branch 2.0.0 was the branch I created from? I didn't commit anything from the new branch.

I followed all the answers from this question and their answers didn't give me what I am expecting. Nothing showed me '2.0.0' or I got errors. Plus some answers were complicated. I am not versed in command line Git commands as I mainly use Git from VS's UI.

I assume this information exists in some Git file in the VS solution. Looking to know which file I can open and it has the answer or use a simple Git command.

Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374
  • Git itself does not keep track of this information, deeming it to be useless. It's possible that VS adds its own non-Git data for this, but I suspect it doesn't. – torek Oct 17 '17 at 22:53
  • I don't think VS keeps track of this information. If this is something you will need eventually but not with an already created branch, you can try to always run Visual Studio as some special user and then check the Owner of the file in `.git/refs/heads/2.0.0`, which represents the branch. If the Owner is that user, it indicates that VS created the branch (not sure if this works, but who knows). – Samir Aguiar Oct 17 '17 at 23:02

1 Answers1

1

This file x:\xxxx\SolutionFolder\.git\logs\HEAD has entries which shows the branches created and where they came from.

Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374