Reputation: 5396
How can I find out what work is not yet pushed to another repository. In other words; what would I permanently loose if I was to delete that repository?
Currently I use the following 3 lines, but I would like to know if this is a complete cover and if it is a sane approach:
git status --short
git log --branches --not --remotes --simplify-by-decoration --decorate --oneline
git stash list
update: it seems that submodules are not checked. Is there a way to include submodules recursively?
Upvotes: 17
Views: 2219
Reputation: 19767
You might like something like git show-branch --color=always -a --more=15
?
The *
is your local repo, the +
indicates the others. If a comment is present in a repo, the *
/+
will indicate it's existence there.
What exists in your master
branch but not in origin/master
is not pushed yet.
Upvotes: 0
Reputation: 1328152
it seems that submodules are not checked. Is there a way to include submodules recursively?
Not easily, because each submodule can have its own history, set of branches and upstream repo ('origin' or even another name)
As described in "Git history including/interleave submodule commits", git log --submodules
would just indicate the SHA1 currently referenced by the parent repo.
That leaves you with a recursive command like:
git submodule foreach git log
Upvotes: 1