Where is git-blame in SourceTree

28,485

Solution 1

Starting sourcetree 3.0

Right click file > Annotate Selected

enter image description here

Solution 2

Select a file, whether in the 'working copy' display or in the 'commit' display, and do one of three things:

  1. option-command-B
  2. menu bar :: Actions :: Blame Selected...
  3. contextual menu :: Blame Selected...

If the file you want to blame is not in the modified files list, you need to change the view to File Status View (View --> File Status View), then set the Sub menu to "Show All"

Show All on OSX

Solution 3

  1. Switch to the history view and select a commit that has the file you would like to blame.
  2. Right-click the file name and select Blame Selected.

Alternatively, you can right-click a file in the working tree or that has been staged and do the same thing.

Solution 4

Right click the file-> Blame selected. You can find writer of Each line . Trick: Make a minor change like adding a space in the file you want to find the file easily(File Status) in Source tree.

Share:
28,485
wnrph
Author by

wnrph

Interested in natural siences, networking, linux, computer engineering, c++ and the web

Updated on July 05, 2022

Comments

  • wnrph
    wnrph almost 2 years

    I'd like to see who contributed which line/change to a file. git-blame does exactly that. So does SourceTree have a git-blame view?

  • GoZoner
    GoZoner almost 12 years
    Not sure what you are asking. A file changing since the last commit doesn't impact the blame (as the blame is based on the past commits). If the file hasn't change then in Source-Tree you'll find it by selecting 'Working Copy' and then 'Show All' (not 'Show Pending'). From there you can see all the files and select the one you want the blame for.
  • TommyAutoMagically
    TommyAutoMagically about 6 years
    Note that for some inexplicable reason, this has changed from "Blame Selected" to "Annotate Selected"
  • Erwin Wessels
    Erwin Wessels almost 6 years
    It seems like "Blame" and "Annotate" are near synonyms (for some spelunking on that, see this post on the git mailing list). I'm also suspecting some political correctness being injected.
  • shadowsheep
    shadowsheep over 5 years
    Someone indeed opened an issue for that.
  • Sergey
    Sergey over 2 years
    "Log Selected..." and "Blame" are different things
  • Sergey
    Sergey over 2 years
    Also pointed out by an Atlassian employee community.atlassian.com/t5/Sourcetree-questions/…
  • Sergey
    Sergey over 2 years
    It's been renamed to "Annotate" in newer versions...