Larry
Larry

Reputation: 348

git - find unmerged branches without local repository

I love the git branch --no-merged command for finding branches that have changes that are not merged into the current branch.

Is it possible to do that without having a local copy of the repository?

With subversion, you could do this:

svn mergeinfo source target --show-revs eligible

That would show the unmerged changes that were in source but not target. If those were full urls, you didn't have to have the repo checked out.

I want to see the unmerged changes between two branches without cloning the repository locally. Is that possible with git?

Upvotes: 1

Views: 217

Answers (1)

Alex Wolf
Alex Wolf

Reputation: 20138

This fully depends on the way you host your remote repository.

For example if you can access your remote repository via ssh you could just go into the folder where the repository resides and check the branches using your familiar git branch --no-merged.

On the other hand, if you have your repo hosted on a service like github I don't believe that there is a possiblity to get this information without cloning, as long as the hosting service doesn't provide such a functionality out of the box.


If you want to avoid cloning because the repository is kinda large, you can always create a shallow clone using the --depth option of git clone (documentation). Since you want to compare branches you would also need to pass the --no-single-branch option.

Upvotes: 1

Related Questions