2

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?

random
  • 9,774
  • 10
  • 66
  • 83
Java Questions
  • 7,813
  • 41
  • 118
  • 176
  • possible duplicate of [git: show all changed files between two commits](http://stackoverflow.com/questions/1552340/git-show-all-changed-files-between-two-commits) – random Aug 28 '13 at 20:43

1 Answers1

5

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.