Home > Net >  How to use Git in Windows to recursively list the files committed, with the commit dates in descendi
How to use Git in Windows to recursively list the files committed, with the commit dates in descendi

Time:04-22

So I am using Visual Studio 2022 Community and Git as the version control. The Git repository is stored locally on my computer. I have also downloaded and installed Git for Windows from the official Git website: enter image description here

If I do this with Visual Source Safe, Visual Source Safe will show all files that were checked in, including the files in all subfolders of the folder I am viewing the history of (hence the Recursive option), in a descending sort order of files checked in (ie. the latest checked in files will appear at the top). In a nutshell, I want to do with Git what I can already do with Visual Source Safe.

Unfortunately, the Git window in Visual Studio 2022 Community does not show this (it just shows the overall commit, but you have to click on each overall commit to see the files that were checked into Git for that commit, which isn't near as useful as what Visual Source Safe does). Since I also installed Git for Windows, I can run the Git command from the DOS prompt but I don't know the Git command and parameters that is capable of doing what Visual Source Safe can do. Any help would be appreciated, thanks!

CodePudding user response:

So with @jthill's help, I tested around with some of the options for the git command. The git command that does what I want is:

git log --name-status --oneline --pretty=format:"%x09

  • Related