简体   繁体   中英

How to see the commit after which a repository was forked using git?

I have an original repo A, suppose after commit10 I forked repo B. repo A continued developing and so did repo B. I want to see only things which were added by repoB person ie diff of HEAD and commit10.

How to figure out what is commit10, at what point was repoB forked?

There are many similar questions on stackoverflow but they are trying to diff current version of two repos. That is different from what I need.

Your question is vague but I will still give it a try.

You can do a git merge-base --help to get all the options.

Looks like you basically want to compare commits across 2 branches in separate forks.

git merge-base branchA branchB

Regarding your point

How to figure out what is commit10, at what point was repoB forked?

You can get a graph of the branch history to get an idea of the point when repoB was forked. Following command should help

git log --graph --oneline --decorate --all

Look for more options under git log --graph

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM