Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Show log history of a directory in Source Tree

Schreini
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2017

How can I show the log History of an entire directory so that I see only commits affecting files in this directory?

4 answers

1 accepted

2 votes
Answer accepted
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2017

I haven't seen anything like this yet.

As far as I understood git yet, git does not handle directories - it simply handles files (for example you cannot add an empty directory to git). git is not aware of the concept of directories. As Sourcetree is mainly a git GUI-Frontend, SourceTree is also (mainly) directory agnostic.

Callum Barker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 8, 2018

Still not possible in Sourcetree AFAIK. You can however use

gitk -- path/to/folder 

from the command line to display a GUI showing the git commits that affected a particular folder.

Like Hicham Berrada likes this
4 votes
James Dengel January 17, 2017

I do not know of a way to do this in SourceTree but using the terminal

the commands you are looking for are:

 

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

This should give you the history of the folder.

3 votes
Thomas Chen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2019

Select the directory from whichever view you want. Right-click and choose "log selected". You can even do this while looking at deleted directories in the history.

Jesús López
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2019

Thank you!

ych
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2020

@Thomas Chen could you please clarify how exactly you select the directory?

Like # people like this
sachelis September 22, 2021

From which view can you "select the directory"? I can select files and choose "log selected," but I don't know of anywhere within Sourcetree that I can right-click on a directory.

Like Sushil Singh likes this
Pete Fowler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 3, 2023

right clicking and selecting log selected on a folder works sometimes, but often times the log selected option is disabled. Any way to make it work all the time? Why is it disabled sometimes? Thx

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2017

You can't do that in SourceTree. There may be a complex git command that gets you that information, but I don't know what it is.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events