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)
45,614 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)
284,472 students enrolled
40 hours of video content
View Course
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
130,921 students enrolled
48.5 hours of video content
View Course