Add repository B
as a remote in repository A
then, inside A
, fetch from B
:
$ git remote add B {local-path-or-url-of-B}
$ git fetch B
Now, all the branches and tags present in B
also exist in A
and it's easy to compare the local branches (find them using git branch -v
) with remote branches (git branch -r -v
).
Using a GUI Git client makes the comparison even easier.
--
At this point, almost everything that is in B
is also in A
(the stash is missing). You can use rebase, merge, cherry-pick etc. to append branches and commits imported from B
into the branches present in A
(or vice-versa).
You can remove the B
repository, but don't remove the B
remote of A
until you are sure everything that is in B
and you need in A
can be reached using tags or branches of A
.