I have a remote Git repository to which I can push/pull from a local repository via SSH.
I can use the Git status
command to check the untracked/unstaged files in the local repository. How do I do the same with the remote repository?
Please note that I'm not looking at finding the differences between the local commit and the remote commit.
git fetch --dry-run --verbose
may show what you need.
Example:
# Before a remote update:
user@localhost:~/build/demo/myrepo$ git fetch --dry-run --verbose
From https://gitserver.local/git/myrepo
= [up to date] master -> origin/master
# After a remote update:
user@localhost:~/build/demo/myrepo$ git fetch --dry-run --verbose
POST git-upload-pack (328 bytes)
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 6), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From https://gitserver.local/git/myrepo
83619a7..67ea28b master -> origin/master
Caveats:
git push --dry-run
helps for this case.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