I'd like to delete some old forks I drawn but I cannot remember whether I ever pushed any changes to those forks.
How can I see whether I created a branch or whether I commited any changes to any branch in my repository's fork?
In the GitHub UI: Just click on the "commits" button and see if one of the most recent commits is yours. This requires manually looking through the commits, so it will only work well if your commit is one of the most recent (because you committed to your fork and never pulled updates) or if there's a small number of commits and you can look through them all.
Using Git: This method is fool-proof, even for repositories with thousands of commits.
git clone ...
git remote add upstream ...
git fetch upstream
git rev-list --oneline master ^upstream/master
If rev-list doesn't list any commits, then there are no commits in your master branch that haven't been merged to the upstream fork, and your repository can be safely deleted.
If you may have committed on branches other than master:
git branch
git rev-list --oneline local-branchname ^origin/master
. Or compare against some other branch than upstream/master
depending on where it would have been merged to.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