I'd like to get a list of all the files present in git at a given point.
I've tried issuing something like:
git show --pretty="format:" --name-only f21b25e76d146
This only shows the files that where added though, not ALL the files present in the working directory at that specific commit. Is there a way to do so?
Thanks a lot in advance.
In Git, we can use git show commit_id --name-only to list all the committed files that are going to push to the remote repository.
If you simply run git log command then you will get list of all Commits done till now. But if you use git log -p command, then you will see all the Commits along with the changes done in each Commit.
This command will list the files that are being tracked currently. If you want a list of files that ever existed use: git log --pretty=format: --name-only --diff-filter=A | sort - | sed '/^$/d'This command will list all the files including deleted files.
To pull up a list of your commits and their associated hashes, you can run the git log command. To checkout a previous commit, you will use the Git checkout command followed by the commit hash you retrieved from your Git log.
git ls-tree -r --name-only --full-tree f21b25e76d146
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With