Search code examples
gitgit-pushgit-pull

git search local history


I made a couple commits without making a git push. After that I made a git push and know I can't find these commits that were only local. Can I somehow find those commits that I didn't push to remote repo?


Solution

  • You can use git log --oneline --all to show all commits that are in your repo, even if they're not in the history of your current branch.

    See also: git log manpage