简体   繁体   中英

List out all the files that I have pushed to the remote Git repo

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?

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} , ie origin/master at its 1st previous position, and the current state of origin/master , as last known by your local repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM