How to only view commits created on a fork or branch? #22055
-
So, if I have a project that was forked, and I want to view only commits added to the fork, and not commits from the original project; how can I do that? Or more generally, view only commits added on the current branch? e.g. branch ‘feature’ was created from master, and I’d like to see a list of all commits created on feature, but not the commits from master? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
Hi @icodesometime, This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information. As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here. Let me know if you have any other questions or if I can help with anything else. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Thanks… Sorry, this is my first time using the forum |
Beta Was this translation helpful? Give feedback.
-
You can see the commits that exist only on the target branch but not on the base branch with the following (rather long) command:
If you want to see what the various options do, you can view this command on explainshell.com. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Cool, thanks! I gather there’s no way to do this in GitHub then? |
Beta Was this translation helpful? Give feedback.
-
Hi @icodesometime, Actually you should be able to view all the commits for a branch on github.com. To do so, you just need to select the branch from the “Branch” dropdown. This will put you directly on the branch whose commits you want to view. Then you can select “Compare” This will allow you to view a list of all the commits made for that branch. Hope this helps! Cheers! |
Beta Was this translation helpful? Give feedback.
-
What if I want to view last commits to master? Compare does not show on master… |
Beta Was this translation helpful? Give feedback.
-
On github you can go to repository you need, and then append to the address string the So you will get something like this:
|
Beta Was this translation helpful? Give feedback.
Hi @icodesometime,
Actually you should be able to view all the commits for a branch on github.com. To do so, you just need to select the branch from the “Branch” dropdown.
This will put you directly on the branch whose commits you want to view. Then you can select “Compare”
This will allow you to view a list of all the commits made for that branch.
Hope this helps! Cheers!