Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find a file in my git repository with SourceTree?

How can I find a file in my git repository with SourceTree?

Currently, the file has to be present in some branch log, but I want to search on the repository.

I want to:

  • right-click the file
  • Log Selected...

  • and peek at it's history.

The SourceTree file history is quite good.

enter image description here

enter image description here

like image 628
Dimitri Dewaele Avatar asked Jan 09 '15 15:01

Dimitri Dewaele


People also ask

How do I find a file in SourceTree?

You can view an individual file log by name, using the same method in juffel's answer (Workspace > File status > All files in combo), and then write the filename in the Search box at the right. You will see directly the file log without searching manually in the file list.

How do I track a file on GitHub?

When you start a new repository, you typically want to add all existing files so that your changes will all be tracked from that point forward. So, the first command you'll typically type is "git add ." (the "." means, this directory. So, it will add everything in this directory.) I'll type "git add ." and press Enter.

What are unstaged files in SourceTree?

The unstaged files are just the files with the last modifications you brought. The staged file are like a snapshot that you take at a T time, Git will store these snapshots under staged files (one snapshot/file at a time).


2 Answers

In the working copy view there is a dropdown where you can select a filter for the visible files in the column below. Just select "All Files" instead of the "Pending" default.

On the right side there also is a Searchbox to filter this file list.

SourceTree Working Copy View Screenshot

like image 106
juffel Avatar answered Sep 22 '22 11:09

juffel


You can view an individual file log by name, using the same method in juffel's answer (Workspace > File status > All files in combo), and then write the filename in the Search box at the right. You will see directly the file log without searching manually in the file list.

like image 35
hardyx Avatar answered Sep 22 '22 11:09

hardyx