0

I was recently given a complex project by a client with a convoluted Git history. Not only could I not locate the source code branch, but the commits were also difficult to comprehend. I am unsure where to begin and where to make my own commits. I believe I need to visualize the commit and branch history graph in a single view. How can I achieve this?

Of course, I used git log command to see the Git history and commit information. To view a simplified graph of the commit history, so I added --graph option to the command. For example, git log --graph. However, it is not easily visible to me in a single glance. So the best solution I think is that using Source-Tree tool.

Rodolfo
  • 7
  • 3
  • When you say "I could not locate the source code branch", either you or the creators of the history have [misunderstood the purpose of branches](https://stackoverflow.com/a/40291997/6868543). – j6t Aug 25 '23 at 06:30
  • 1
    `gitk` is also incredibly useful to visualize history (and is part of the Git project). Still agree with j6t, there seems to be confusion about branches. You don't have to "find" branches; usually there's a `main` or `master` branch which contains the development mainline. Features are developed based on the mainline and then integrated. – knittl Aug 25 '23 at 06:46
  • I agree with @knittl, `gitk --all &` is the best visualizer you can start using. – hlovdal Aug 25 '23 at 12:20

0 Answers0