Reputation: 7953
How do I list out all the files that I have pushed in my last push to a remote Git repository?
I have a project and have modified only few files and add, commit and push
it to the remote. Now how do I see the list of files I have pushed to remote?
Should it have something to do with last commit ID?
Upvotes: 2
Views: 1840
Reputation:
You can use your remote-tracking branches and their reflog to see what changes you have pushed. For example, if you pushed code to origin/master
, you can list all the files that you changed with the following:
git diff origin/master@{1} origin/master --name-status
The syntax basically says to take the difference between origin/master@{1}
, i.e. origin/master
at its 1st previous position, and the current state of origin/master
, as last known by your local repo.
Upvotes: 5