Reputation: 6287
I can execute various Git commands from Visual Studio Code, however I couldn't find a way to visualize the history.
Upvotes: 584
Views: 637489
Reputation: 61
Using VS Code version 1.93.1, the best way for me to just see the GIT history is "source control graph" (by default in "source control").
Using the "Timeline" (by default in "Explorer") is also helpful but other actions like saving the file are also included. Thus the overview is not that great for the purpose to see the GIT history.
Upvotes: 0
Reputation: 3488
I recommend you this extension, Git History by Don Jayamanne
It does exactly what you need and has these features:
repo: https://github.com/DonJayamanne/gitHistoryVSCode
Upvotes: 334
Reputation: 793
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.
Upvotes: 2
Reputation: 1329632
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:
Upvotes: 464
Reputation: 2023
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.
Upvotes: 68
Reputation: 2048
I strongly recommend using a combination of GitLens & GitGraph.
Below snapshot highlights how gitlens is showing commit over time
And the below picture is for the the amazing vivid GitGraph
Upvotes: 37
Reputation: 46479
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.
Upvotes: 71
Reputation: 51200
Git Graph seems like a decent extension. After installing, you can open the graph view from the bottom status bar.
Upvotes: 15
Reputation: 1676
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:
Upvotes: 1
Reputation: 6736
GitLens has a nice Git history browser. Install GitLens from the extensions marketplace, and then run "Show GitLens Explorer" from the command palette.
Upvotes: 123