Project Icon

vscode-gitlens

GitLens为VS Code增强Git功能 提升代码理解与协作

GitLens是Visual Studio Code的开源Git增强扩展,深度集成Git功能以提升开发体验。它提供行内注释、文件标注和修订导航等功能,帮助开发者更好地理解代码历史和上下文。GitLens还包含Commit Graph、Worktrees等高级功能,并集成GitHub等平台,全面提升代码审查和团队协作效率。GitLens适用于个人和团队项目,简化Git使用流程,提高工作效率。

GitLens — Supercharge Git in VS Code

Supercharge Git and unlock untapped knowledge within your repository to better understand, write, and review code. Focus, collaborate, accelerate.

GitLens is a powerful open-source extension for Visual Studio Code.

GitLens supercharges your Git experience in VS Code. Maintaining focus is critical, extra time spent context switching or missing context disrupts your flow. GitLens is the ultimate tool for making Git work for you, designed to improve focus, productivity, and collaboration with a powerful set of tools to help you and your team better understand, write, and review code.

GitLens sets itself apart from other Git tools through its deep level of integration, versatility, and ease of use. GitLens sits directly within your editor, reducing context switching and promoting a more efficient workflow. We know Git is hard and strive to make it as easy as possible while also going beyond the basics with rich visualizations and step-by-step guidance and safety, just to name a few.

Getting Started

Watch the GitLens Getting Started video

Install GitLens by clicking Install on the banner above, or from the Extensions side bar in VS Code, by searching for GitLens.

Use Switch to Pre-Release Version on the extension banner to live on the edge and be the first to experience new features.

Is GitLens Free?

All features are free to use on all repos, except for features,

  • marked with a Pro require a trial or paid plan for use on privately-hosted repos
  • marked with a Preview require a GitKraken account, with access level based on your plan, e.g. Free, Pro, etc

See the FAQ for more details.

Features | Labs | Pro | FAQ | Support and Community | Contributing | Contributors | License

Discover Powerful Features

Quickly glimpse into when, why, and by whom a line or code block was changed. Zero-in on the most important changes and effortlessly navigate through history to gain further insights as to how a file or individual line's code evolved. Visualize code authorship at a glance via Git blame annotations and Git CodeLens. Seamlessly explore Git repositories with the visually-rich Commit Graph. Gain valuable insights via GitLens Inspect, and much more.

Blame, CodeLens, and Hovers

Gain a deeper understanding of how code changed and by whom through in-editor code annotations and rich hovers.

Inline and Status Bar Blame

Provides historical context about line changes through unobtrusive blame annotation at the end of the current line and on the status bar.

Inline Line Blame
Inline blame annotations
Status Bar Blame
Status bar blame annotations

💡 Use the Toggle Line Blame and Toggle Git CodeLens commands from the Command Palette to turn the annotations on and off.

Git CodeLens

Adds contextual and actionable authorship information at the top of each file and at the beginning of each block of code.

  • Recent Change — author and date of the most recent commit for the file or code block
  • Authors — number of authors of the file or code block and the most prominent author (if there is more than one)

Rich Hovers

Hover over blame annotations to reveal rich details and actions.

Current Line Hovers

File Annotations

Use on-demand whole file annotations to see authorship, recent changes, and a heatmap. Annotations are rendered as visual indicators directly in the editor.

File Blame
File Blame annotations
File Changes
File Changes annotations
File Heatmap
File Heatmap annotations

💡 On an active file, use the Toggle File Blame, Toggle File Changes, and Toggle File Heatmap commands from the Command Palette to turn the annotations on and off.

Revision Navigation

With just a click of a button, you can navigate backwards and forwards through the history of any file. Compare changes over time and see the revision history of the whole file or an individual line.

Revision Navigation

Side Bar Views

Our views are arranged for focus and productivity, although you can easily drag them around to suit your needs.

Side Bar views
GitLens Inspect as shown above has been manually moved into the Secondary Side Bar

💡 Use the Reset Views Layout command to quickly get back to the default layout.

GitLens Inspect

An x-ray or developer tools Inspect into your code, focused on providing contextual information and insights to what you're actively working on.

  • Inspect — See rich details of a commit or stash.
  • Line History — Jump through the revision history of the selected line(s).
  • File History — Explore the revision history of a file, folder, or selected lines.
  • Visual File History Pro — Quickly see the evolution of a file, including when changes were made, how large they were, and who made them.
  • Search & Compare — Search and explore for a specific commit, message, author, changed file or files, or even a specific code change, or visualize comparisons between branches, tags, commits, and more.

GitLens

Quick access to many GitLens features. Also the home of GitKraken teams and collaboration services (e.g. GitKraken Workspaces), help, and support.

  • Home — Quick access to many features.
  • Cloud Patches Preview — Easily and securely share code with your teammates
  • GitKraken Workspaces Preview — Easily group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.
  • GitKraken Account — Power-up with GitKraken Cloud Services.

Source Control

Shows additional views that are focused on exploring and managing your repositories.

  • Commits — Comprehensive view of the current branch commit history, including unpushed changes, upstream status, quick comparisons, and more.
  • Branches — Manage and navigate branches.
  • Remotes — Manage and navigate remotes and remote branches.
  • Stashes — Save and restore changes you are not yet ready to commit.
  • Tags — Manage and navigate tags.
  • Worktrees Pro — Simultaneously work on different branches of a repository.
  • Contributors — Ordered list of contributors, providing insights into individual contributions and involvement.
  • Repositories — Unifies the above views for more efficient management of multiple repositories.

(Bottom) Panel

Convenient and easy access to the Commit Graph with a dedicated details view.

  • Commit Graph Pro — Visualize your repository and keep track of all work in progress.

Commit Graph Pro

Easily visualize your repository and keep track of all work in progress.

Use the rich commit search to find exactly what you're looking for. Its powerful filters allow you to search by a specific commit, message, author, a changed file or files, or even a specific code change. Learn more

Commit Graph

💡Quickly toggle the Graph via the Toggle Commit Graph command.

💡Maximize the Graph via the Toggle Maximized Commit Graph command.

Launchpad Preview

Launchpad brings all of your GitHub pull requests into a unified, actionable list to better track work in progress, pending work, reviews, and more. Stay focused and take action on the most important items to keep your team unblocked. Learn more

Launchpad

Code Suggest Preview

Liberate your code reviews from GitHub's restrictive, comment-only feedback style. Like suggesting changes on a Google-doc, suggest code changes from where you're already coding — your IDE and on anything in your project, not just on the lines of code changed in the PR. Learn more

Code Suggest

Cloud Patches Preview

Easily and securely share code changes with your teammates or other developers by creating a Cloud Patch from your WIP, commit or stash and sharing the generated link. Use Cloud Patches to collaborate early for feedback on direction, approach, and more, to minimize rework and streamline your workflow. Learn more

Worktrees Pro

Efficiently multitask by minimizing the context switching between branches, allowing you to easily work on different branches of a repository simultaneously.

Avoid interrupting your work in progress when needing to review a pull request. Simply create a new worktree and open it in a new VS Code window, all without impacting your other work.

Worktrees view

GitKraken Workspaces Preview

GitKraken Workspaces allow you to easily group and manage multiple repositories together, accessible from anywhere, streamlining your workflow. Create workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration. Learn more

Visual File History Pro

Quickly see the evolution of a file, including when changes were made, how large they were, and who made them. Use it to quickly find when the most impactful changes were made to a file or who best to talk to about file changes and more.

Visual File History view

Interactive Rebase Editor

Easily visualize and configure interactive rebase operations with the intuitive and user-friendly Interactive Rebase Editor. Simply drag & drop to reorder commits and select which ones you want to edit, squash, or drop.

Interactive Rebase Editor

Comprehensive Commands

Stop worrying about memorizing Git commands; GitLens provides a rich set of commands to help you do everything you need.

Git Command Palette

A guided, step-by-step experience for quickly and safely executing Git commands.

Git Command Palette

Quick Access Commands

Use a series of new commands to:

  • Explore the commit history of branches and files
  • Quickly search for and navigate to (and action upon) commits
  • Explore a file of a commit
  • View and explore your stashes
  • Visualize the current repository status

Integrations

Context switching kills productivity. GitLens not only reveals buried knowledge within your repository, it also brings additional context from issues and pull requests providing you with a wealth of information and insights at your fingertips.

Simplify your workflow and quickly gain insights with automatic linking of issues and pull requests across multiple Git hosting services including GitHub, GitHub Enterprise Pro, GitLab, GitLab Self-Managed Pro, Jira, Gitea, Gerrit, Google Source, Bitbucket, Bitbucket Server, Azure DevOps, and custom servers.

All integrations provide automatic linking, while rich integrations with GitHub, GitLab and Jira offer detailed hover information for autolinks, and correlations between pull requests, branches, and commits, as well as user avatars for added context.

Define your own autolinks

Use autolinks to linkify external references, like Jira issues or Zendesk tickets, in commit messages.

GitKraken Labs

Our incubator for experimentation and exploration with the community to gather early reactions and feedback. Below are some of our current experiments.

🧪AI Explain Commit

Use the Explain panel on the Inspect view to leverage AI to help you understand the changes introduced by a commit.

🧪Automatically Generate Commit Message

Use the Generate Commit Message command from the Source Control view's context menu to automatically generate a commit message for your staged changes by leveraging AI.

Ready for GitLens Pro?

When you're ready to unlock the full potential of GitLens and our DevEx platform and enjoy all the benefits on your privately-hosted repos, consider upgrading to GitLens Pro.

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号