0

I have created a repository "droid_fun", one called "droid_per" and another one called "droid_common".

Now, I have added a subtree from droid_fun to droid_common to the branch "master". How can I know in the future what branch I have selected? I will create separated branch (fun, per, etc.) in the common library, so it will be useful to know it.

Thanks :)

Filnik
  • 352
  • 1
  • 12
  • 33
  • Side note: I have not worked with submodules, as I read a lot of negative posts about them, and instead opted for subtrees. In my experience, they were not that good at all. Once the project gets big, extracting subtree becomes slow, and the log graph of the repository has many unnecessary branches. – Shahbaz Jan 30 '15 at 11:31

1 Answers1

0

I think that information is lost. But as you fetch from the common repository, you can at least see the tip of the branches. This lets you possibly trace and understand which branch was merged into your branch.

To do that, do:

$ git log --graph --pretty=oneline --decorate --all

Unfortunately, this could get tedious.

If you have the discipline, you can write in your commit message which branch it was that you just merged in. That way, you can quickly look at the log and tell this:

$ git log -- your/subtree/prefix
Shahbaz
  • 46,337
  • 19
  • 116
  • 182