-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git: Support git history in VSCode #68
Comments
It would be great if we could right click a file and see the Git history for the file. If anyone knows of a nice OS X client that will allow me to easily find a file and view the history then let me know! I've found out how to do it on SourceTree but it's way too fiddly, and GitHub for Mac doesn't have such a feature. |
@massimocode just wondering would an action to open the file on github and then view the history there cover your needs? For example there is an |
@egamma that works, but vscode's diff is waaaaaaaaay better than github :) Also, it would be awesome to stay inside vscode to do that |
@egamma Hey Erich, thanks for the reply. Unfortunately we're not using GitHub, we're using Stash. It would be great if VSCode has inbuilt support for viewing source control history, like Visual Studio, although I can appreciate it would be a large effort! It also enables viewing history offline, which is great and leverages one of the main benefits of distributed source control. |
Valid points CC @chrisdias |
How about an interactive history view, something like git extentions (http://gitextensions.github.io/ ) would be cool! |
There is now a git history extension available that you can try: https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory |
Yeah, has seen that one before, but its functionality is too limited. |
@egamma Thanks this extension is exactly what I was looking for! |
@massimocode , the githistory extension https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory now supports:
|
Is there any way using that extension (or any other extension available) to view the diff between two branches? When there's a long commit history with a lot of different contributors and various branches, it's very tedious to go find out which commit corresponds to a given branch, and then scroll through the commit history to find that commit. Even when commit messages shown, it's difficult to keep track which commit is the latest on a given branch. This git command is very simple and straightforward and does exactly what I want:
Unfortunately, the output in the command line is difficult to read and navigate through, so I would love to have the above functionality but be able to view it in VSCode's diff. I find VSCode's diff output to be easy to read, but right now it seems to be limited to only option 6 above. The Git History extension allows me to perform option 4 and 5 above as well, but that is still very limited, as I have to know which commits I want to compare (and the only way to compare a branch is to go separately find out the latest commit on that branch). Perhaps there is a way to do what I want in the extension and I just haven't found that functionality, but I don't know because documentation for the extension is almost non-existent. If anyone here knows how you can compare branches using the extension (or another existing extension) I would love to know. Currently, my only workaround is to also open my local repo in IntelliJ (since it has built-in functionality to compare any branches or commits) while working in VSCode, so I have to have two IDEs open at once. Given that this functionality is already built into Git with the straightforward |
Sorry, the answer is no. You might want to try other tools such as GitKraken (this too is built on topp of Electron, just like VS Code) or the like. |
It was actually this extension that gave me what I was looking for: |
Check out this extension, it's everything I wanted in a merge compare tool https://marketplace.visualstudio.com/items?itemName=letmaik.git-tree-compare#review-details |
There's also https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens ... really REALLY neat. |
in gitlab, we can see branch's commits list is there same functionality in gitlens? thanks in advance |
Having moved from Windows to Mac, Git Extensions is the one thing I miss every day. If VS Code could replicate that experience it would make my day. |
@starcraft0429 this is a late response, but yes, GitLens extension has side by side view (July 2018) https://github.com/eamodio/vscode-gitlens/#powerful-comparison-tools When comparing two branches, it lists the files with diffs. You can then select the individual files and see a side by side comparison between the branches. Steps to take:
In the RESULTS section, there will be a node with |
Sublime merge (https://www.sublimemerge.com/) was just released and it a view that could be nicely integrated into vscode. What I really like in this screenshot is the history on the left. At a a glance I can see other branches, how many files have been edited in each commit, and what has been pushed. I think that adding a simple history view like this would be a powerful addititon to VSCode. What do people think? Would adding a view like this with some basic options on right click be what you want for this feature request? |
For anyone looking for an alternative / workaround - I'll repeat what a few people have said so far: try the GitLens extension. It adds a significant amount of extra functionality and I use it constantly while working. |
Alternatives are not a problem, but i think its should be native option. |
I also think that vs code really need to support this option. For most cases it's the only missing option in vs code git support, and there's no good plugin to do this thing. Since VS code already have git support, it makes sense to add history as well. Looking forward to uninstall source tree from my workstation. |
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph looks like git history |
Great plugin! Thank you. Finally it’s time to uninstall sourcetree. Would be great to have it out of the box in vs code. Git log is a vital thing and since vs code supports git, history should be supported too IMO. It’s integrity. |
The Timeline preview in 1.42 is relevant to this issue. |
Git Lens (made by @eamodio) now let’s you rebase and squash commits in the UI, which I believe satisfies the original issue raised. |
As @jasonwilliams said, GitLens now supports this. You can download Gitlens for more advanced git features in VS Code https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens |
'git graph' will be better |
It would be awesome to be able to squash commits right from the UI too
The text was updated successfully, but these errors were encountered: