by Sai gowtham

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.

  1. Copy your commit id from the commit list by running the git log command followed by the --oneline flag.
git log --oneline
  1. 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

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
26,545 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
221,520 students enrolled
44 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
114,575 students enrolled
21 hours of video content
View Course