I would like to know how to use git blame to know who created a single directory.
When I try:
git blame DIRECTORY_NAME
I get:
fatal: no such path DIRECTORY_NAME in HEAD
Incidentally, the directory is empty. Any suggestions?
The git blame command is used to examine the contents of a file line by line and see when each line was last modified and who the author of the modifications was. The output format of git blame can be altered with various command line options.
On GitHub.com, navigate to the main page of the repository. Click to open the file whose line history you want to view. In the upper-right corner of the file view, click Blame to open the blame view.
to think or say that someone or something is responsible for something bad blame somebody/something (for something) She doesn't blame anyone for her father's death. A dropped cigarette is being blamed for the fire. blame something on somebody/something Police are blaming the accident on dangerous driving.
Browse to the desired Directory through Commands in Git Bash Open your Git Bash. Type the following command cd <path of the directory> and press enter.
Try getting a log of just that directory, and use the -p option to see the exact changes that occurred.
$ git log -p <path to directory>
This still might not tell you exactly who created the directory, since git seems to focus more on file content, but you might get some helpful clues just from seeing the first time any content was added to it.
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