How to view commited files not pushed to Git remote
In this tutorial, we are going to learn about how to view commited files that are not pushed to the git remote repository yet.
- Copy your commit id from the commit list by running the
git log
command followed by the--oneline
flag.
git log --oneline
- Run the following command by replacing with your copied commit id.
git diff-tree 39384ds --name-only -r --no-commit-id
31384ds
is my commit id.
Now, you can see the list of commited files similar to the following output.
add.js
subtract.js
preview.html
package.json