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?
We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.
You can opt into sharing your private contributions in your profile settings. Details of the issues, pull requests, and commits you have made on private repositories are only visible to your fellow repository collaborators.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With