- File History for tracking how entire files have evolved over time
- Line History for seeing who changed specific lines of code
- Search & Compare for finding specific commits across your project
GitLens features are available in both Git Lite and Git Advanced modes, providing the same functionality regardless of your chosen Git interface.
File History
File History shows a chronological list of all commits that affected a selected file, helping you understand how entire files have evolved over time. This feature is useful for seeing the overall development pattern of specific files and understanding major changes made by your team. Step-by-Step Instructions:- Select a file in the Code IDE
- Click the GitLens icon in the left sidebar of the Code IDE
- View “File History” tab in the GitLens panel to see chronological list of all commits
- Click on specific commits to view detailed changes made in that commit
Line History
Line History shows who made changes to specific lines of code and when they were made through inline annotations that appear next to each line. This feature helps you understand the context behind code changes and identify the author of specific modifications for collaboration or debugging purposes. Step-by-Step Instructions:- Open any file in the Code IDE
- Click a line of code to see inline annotations showing the most recent author and commit date
- Hover over annotations to see additional details about the most recent commit
- For full line history (beyond just the most recent commit):
- Click the GitLens icon in the left sidebar of the Code IDE
- Reselect the line to view complete change history for that specific line
Search & Compare
Search & Compare allows you to quickly find commits, changes, or contributions across your entire project, as well as compare different branches or references. This feature eliminates the need to manually browse through commit history when looking for specific changes or contributions. Step-by-Step Instructions:- Click the GitLens icon in the left sidebar of the Code IDE
- Navigate to “Search & Compare” tab in the GitLens panel
- Choose between two options:
- Select your search type (Author, Message, or File)
- Enter search terms (e.g., author name “fabio” or message keyword “fix”)
- Review search results and click on commits to view detailed information
- Select the first reference (branch, tag, or ref) you want to compare
- Select the second reference (branch, tag, or ref) to compare against
- Review the comparison to see differences between the two references