TheBAST
TheBAST

Reputation: 2736

How to view all the project files and its history that were manipulated inside git

How do I find all the history of the files that were tracked inside a git project including the deleted ones, I mean like the bIrds eye view of the project files because right now with the current status of the project, I think I have to just move all these into a new project folder.

Upvotes: 1

Views: 96

Answers (2)

DINA TAKLIT
DINA TAKLIT

Reputation: 8428

  • If you have committed all your changes and you want to show only commit messages. Use:

    git log --oneline -- path/to/folder

  • If you want to state the file(s) that have been modified and the number of lines that have been added/removed with the summary of modified files and lines that been added/removed. Use:

    git log --stat -- path/to/folder

  • If you want to display info about the location of lines that have been modified with actual changes. Use

    git log -p -- path/to/folder

    Note: p stand for patch flag.

  • If you want to view a specific commit among those of the commit of the specific folder. Use git show:

    git show sha-of-the-specific-commit

Now if you want to stat changes that have not been committed yet. You can use:

   git diff -- path/to/folder

I hope it is helpful!

Upvotes: 1

forkdbloke
forkdbloke

Reputation: 1565

Please use below command, in addition add -p to the below command to see the changes in the files.

git log -- path/to/folder
git log -- path/to/folder/*

if you want to use a graphic tool, such as gitk:

gitk -- path/to/folder

Upvotes: 2

Related Questions