Looking for commits A(master), C(0.1), K(0.1.1) and O(0.2).
A - B - D - F - G <- "master" branch (at G)
\ \
\ C - E --M <- "0.1" branch (still at E)
\ \
\ K - L <- "0.1.1" branch (still at L)
\
O - P - F <- "0.2" branch (still at F)
How can detect this commits by scripts without user data about parent branch. In other words, how to determine the first commit (A, O, C, K), belongs to a particular branch, knowing only the name of this branch?
Click on the "Insights" tab of the repository that you want to see the oldest commit, followed by the "Network" sub-tab on the left menu bar. When the page is fully loaded (i.e. you can see lots of lines joining and all), press Shift + ← to go all the way to the first commit.
Using --all --source is close, but will only display one of the branches for each commit. However, if you click on a commit in gitk --all , you'll see that it lists every branch that that commit is on.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
If you have the hash for a commit, you can use the git show command to display the changes for that single commit. The output is identical to each individual commit when using git log -p .
Try
git log master..0.1
I think it should display commit C, E and M(is that a commit?)
Edit: The above works only if you have info about the parent branch.
New answer is to try the tool gitk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With