File history revision

leung coaster October 8, 2012

Will sourcetree add a function that user can track each file's history revision,like tortoise hg in windows?It's useful when focusing some files's change!

5 answers

1 accepted

24 votes
Answer accepted
stevestreeting
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.
October 8, 2012

This feature is already available - right-click on any file and select 'Log Selected'

magleahy May 21, 2015

It's dreamy!

YYdroid April 17, 2016

SourceTree can list all files in workspace and you can right-click on any file and select ‘Log Selected'.   As @Erik van der Neut  said

33 votes
Erik van der Neut July 31, 2014

This is how I do it:

- go to Working Copy (at the top left)

- change the file filter from Pending to "All files"

- then either browse your repository or just type part of the file name in the filter text edit field at the top right. That filter works great as a way to drill down quickly on the file you are looking for.

- When you have found the file you want to know the history of: right click and select "Log Selected...", et vôila! :-)

The resulting list shows the dates the files was changed, who made the change, their commit comments, and of course a detailed breakdown of the exact changes.

Hope this helps.

Erik

huttarl April 5, 2016

Thank you for this detailed explanation – I would not have found it without the first couple of steps you described!

The UI may have changed a bit since you wrote this. For me, in SourceTree v2.2.4 (for Mac OSX), the first step was:

  • Go to  "File status" under "Workspace" (at the top left)
Erik van der Neut April 7, 2016

It's funny, I actually don't follow my own advice anymore. These days I do it as follows instead:

  • Under Workspace (you are right, UI's changed a little by now) I leave that File Status to Pending, I don't change that
  • I make a small insignificant change to the file I want to see the history off (add a space somewhere)
  • This makes the file show up in SourceTree so I can right-click on it and select "Log Selected..."
  • When I am done I revert the insignificant change

My other approach seems a bit overly complicated. Or is there a difference between the two I'm missing now?

Thanks,

Erik

huttarl April 18, 2016

To me it seems like making a change to a file so that it shows up in the list, then remembering to revert that change later (without getting it mixed in with other changes), is a bit more complicated. But I supposed it's easy enough to tell whether a change is insignificant (and it doesn't matter if you forget to revert it). Anyway, to each his own. smile

ramya June 14, 2018

Thank you, i got what i need

9 votes
John_Featherlin August 19, 2015

How about "show history" instead of "log selected" which means absolutely nothing to anyone who uses the product.  I just spent way too long trying to figure out something that should be basic to the program because of ,IMO, poor naming convention.  I hope you consider changing it to prevent future grief.

cornillemichiel September 29, 2015

Yup, 15 mins wasted here as well:)

danwithams October 2, 2015

"Log" is the correct term, if you know the Git commands. https://git-scm.com/docs/git-log

Baris Acar October 20, 2015

How about 'Show git log...'. (I don't think the "selected" adds anything - it's a context menu - I know it applies to the selected item, by <universal user interface conventions>)

danwithams October 20, 2015

We're probably about to stumble on why it's "Log Selected". "Show Git Log for Selected Items" would be the correct, most self-explanatory term, but it's fairly long for a menu item. This thread is appearing for most Google searches for this misunderstanding/obliviousness so most people should get here and find the answer they need. If Atlassian want to take the feedback they've got it here already.

John_Featherlin October 21, 2015

In it's current text, I think "Log" is being interpreted as a verb hence (I literally thought it might try to log what I had selected). I think "Show log" or "View Log" would be much more intuitive.

huttarl April 18, 2016

@Daniel Withams may be correct, but part of the point of SourceTree is for people not to have to learn the git command line interface. So in that sense it's not sufficient to match git experts' knowledge of git commands; it's important to match English speakers' knowledge of what words like "log" mean in English (as @John Featherlin pointed out: to log means to append information to a log, not merely to display a log).

RyanSullivanGA September 8, 2016

Git's usage of "log" is a noun. SourceTree's usage of "Log Selected" turns the word "log" into a verb, which is bad UI design on Atlassian's part for the following reasons:

  1. Log Selected indicates that log is a verb.  Git's usage of the word "log" is always as a noun, which makes sense. SourceTree is breaking away from Git's terminology by using it as a verb.
  2. Log Selected indicates that you need to select items.  Try to select multiple files, and then try to "Log" them in SourceTree by right clicking on the multiple files that were selected.  The context menu now disables the "Log Selected" option.  Huh?

I agree with others that this is a defect in SourceTree. 

"Show Log", "View Log" are good suggestions that stay with the Git terminology of using "log" as a noun.

I personally prefer "View History" that is typical in other source control software. I believe that this not be appropriate, as (I believe) that consistency - in the current context of Git - is more important than personal preferences.

If programmers are finding this thread and commenting on it, then hundreds of more people are also struggling to find this basic functionality.

I've been using SourceTree for years, and have been lamenting SourceTree's lack of a "View History" feature to other programmers.  Now I have to adjust my lamentation to disclose this visual defect.

Atlassian, please take a few minutes to fix this defect.

2 votes
Noah Hoffman December 10, 2012

Thanks Steve - that works great for my local repo, is there a similar feature to view the history of a file/folder on the remote repo?

stevestreeting
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.
December 11, 2012
1 vote
kunchakarra2000 September 19, 2013

I wish there is a feature to view a specific file of my choice but my colleague told me a hack. I put a space on the file I wish to see the file revision. It then shows up in the sourcetree.

Thijs Busser September 24, 2013

That really isn't necessary. When you go to Working Copy you can filter which files are shown. By default it is only the pending files but when you switch it to Show All you will see all the files under version control.

thinsoldier
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.
May 5, 2015

This doesn't work if the file you want to see doesn't exist in the current branch.

doronsyte January 31, 2018
I agree, navigating to a file should be easier!!!

See how P4 did it

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events