I can execute various Git commands from Visual Studio Code, however I couldn't find a way to visualize the history.

- 30,738
- 21
- 105
- 131

- 4,786
- 3
- 15
- 20
-
29strangely, it hides in the Explorer tab under Timeline, rather than in the Git tab... :-) – user3043860 May 02 '21 at 10:06
11 Answers
You won't need a plugin to see commit history with Visual Studio Code 1.44 or more.
Timeline view
This is a unified view for visualizing time-series events (for example, Git commits, file saves, test runs, etc.) for a file. The Timeline view automatically updates showing the timeline for the currently active editor, by default. You can control this default behavior by toggling the eye icon in the view toolbar. Also, similar to other views, the Timeline view supports find or filter as you type.
The Timeline view is collapsed by default at the bottom of the File Explorer. Selecting the Timeline sash will expand the Timeline view.
[...]
Here is the Timeline view in action:
-
50
-
3@Vimes No, for now it is a time-series events (here, Git commits) for a resource (file, folder). – VonC Mar 10 '20 at 16:59
-
1@VonC is there a way in timeline to bring up diff details for then entire commit that the timeline view is showing for a specific file? Is there a way to render "git show
" view in vsc vs command line vi editor experience? – myusrn Aug 24 '20 at 18:50 -
-
@VonC okay thanks for clarification. While the [git history](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory) extension mentioned earlier in this thread does provide a way to use ide for view and diff contents of all aspects of a commit in the history log i assumed an oob story would exist for this given timeline is sort of doing this already but at a file scope level. As suggested i created a new SO question for just that issue [here](https://stackoverflow.com/questions/63586751/does-visual-studio-code-have-ide-story-for-reviewing-git-commit-history-and-doin). – myusrn Aug 25 '20 at 20:40
-
11It does not seem to show history for a folder, only for a single specific file. – PeteH32 Apr 09 '21 at 22:05
-
2Saved my day. When I done `git reset --hard` I lost a file and wasn't able to restore it through `git`, so VSCode had the solution – testing_22 Oct 26 '21 at 12:21
I recommend you this repository, https://github.com/DonJayamanne/gitHistoryVSCode
Git History
It does exactly what you need and has these features:
- View the details of a commit, such as author name, email, date, committer name, email, date and comments.
- View a previous copy of the file or compare it against the local workspace version or a previous version.
- View the changes to the active line in the editor (Git Blame).
- Configure the information displayed in the list
- Use keyboard shortcuts to view history of a file or line
- View the Git log (along with details of a commit, such as author name, email, comments and file changes).

- 30,738
- 21
- 105
- 131

- 2,993
- 1
- 10
- 7
-
32
-
9Git History for VS Code in marketplace https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory – naXa stands with Ukraine Jul 03 '18 at 23:22
-
-
1Does this show the history only after you've installed it? Or would you be able to see commands executed before installing it as well (perhaps VS Code stores it somewhere inaccessible)? – Magne Aug 06 '18 at 07:49
-
1No, I installed it and cannot see the previous history. It shows the history only after its installed – Sathwik Gangisetty Jan 29 '19 at 14:50
-
4I was using GitLens but found it extremely overwhelming. The interface has just too many options. This, on the other hand, is quite straightforward. Liking it so far. – Marc.2377 Oct 24 '19 at 06:01
-
But, if you faced a issue, like ```git.viewHistroy command not found ``` , then look here https://github.com/DonJayamanne/gitHistoryVSCode/issues/238 – Sudarshan Jan 27 '22 at 06:59
-
-
You can open the marketplace in VSCode with Ctrl+Shift+X and then search for "git history" – mnagdev Dec 12 '22 at 08:18
GitLens has a nice Git history browser. Install GitLens from the extensions marketplace, and then run "Show GitLens Explorer" from the command palette.

- 30,738
- 21
- 105
- 131

- 6,296
- 4
- 30
- 31
-
1The latest version of GitLens is really good. It adds a handy sidebar button and allows you to much better visualize changes across multiple branches. – cham Oct 29 '18 at 21:10
-
1yes, i used that, and i highly recommended that extension because it can show in realtime when i click on some link , ref: https://academy.byidmore.com/post/Find-Out-Who-Working-on-This-Line-Via-GitLens-5bd710931bde484c8fbedd33 – yussan Oct 30 '18 at 02:58
-
1@JosephSheedy, `GitLens` seams most popular (downloads) extension for reason. – prosti Jun 12 '19 at 06:42
-
Good plugin. Did too much overlaying for me. stackoverflow.com/a/60013101/229906 built in vscode was exactly what I was looking for. – 0llie Sep 22 '20 at 08:36
-
It is evident to me that GitLens is the most popular extension for Git history.
What I like the most it can provide you side annotations when some line has been changed the last time and by whom.

- 30,738
- 21
- 105
- 131

- 42,291
- 14
- 186
- 151
You don't need an extension to do this, you can just go to Explorer and then Timeline.
If you don't want it in Explorer, you can drag and drop it to the Sidebar, or Source Control or anywhere you want!
If you want more fancy features like visualizing and all that stuff you need an extension.

- 1,595
- 1
- 11
- 26
Git Graph seems like a decent extension. After installing, you can open the graph view from the bottom status bar.

- 30,738
- 21
- 105
- 131

- 49,743
- 32
- 103
- 159
You will find the right icon to click, when you open a file or the welcome page, in the upper right corner.
And you can add a keyboard shortcut:

- 30,738
- 21
- 105
- 131

- 1,634
- 13
- 20
-
22JIC: ... before to see this option, you need to have **Git History** extension previously installed. – Jhegs Nov 11 '18 at 23:31
-
1Can you update your answer with the prerequisites (after testing it is actually the case)? – Peter Mortensen May 03 '20 at 20:34
-
Thanks @Jhegs, somehow I forgot about reinstalling that extension and was looking for this feature everywhere in the settings ♂️ – neojp Feb 19 '21 at 12:58
If you need to know the Commit history only, So don't use much Meshed up and bulky plugins,
I will recommend you a Basic simple plugin like "Git Commits"
I use it too :
https://marketplace.visualstudio.com/items?itemName=exelord.git-commits
Enjoy

- 189
- 3
- 8
There's another comfortable way to navigate the commit history for a file in Visual Studio Code by using the Gitlens extension.
That provides two functionalities, "File history" and "Line history", that are accessible from the VCS menu once Gitlens is installed.
Full explanations with example and doc reference provided in this answer.

- 525
- 1
- 5
- 23