vs code git扩展
You probably know that Visual Studio Code has some great built-in tools for working with GIT in source control. But did you know that there are some amazing extensions out there to help supercharge your workflow with GitHub inside of VS Code? Without wasting much time, let’s see what the best GIT extensions are that you can use in the future.
您可能知道Visual Studio Code具有一些出色的内置工具,可以在源代码管理中使用GIT。 但是您知道吗,那里有一些惊人的扩展来帮助在VS Code中使用GitHub增强您的工作流程? 在不浪费时间的情况下,让我们看看将来可以使用的最佳GIT扩展。
1. Git历史 (1. Git History)
Git History is one of the most downloaded extensions by developers (almost 2.8 million downloads). It’s because of the bunch of functionalities that this extension provides to make our life easier. You can simply download the extension by searching the Git History at the extensions tab. Once the extension is installed, what you have to do is right-click on one of the lines and check out the bunch of useful options they have given.
Git历史记录是开发人员下载最多的扩展程序之一(下载量约为280万)。 由于此扩展提供了许多功能,使我们的生活更轻松。 您可以通过在扩展标签上搜索Git历史记录来简单地下载扩展。 一旦安装了扩展程序,您要做的就是右键单击其中的一行,并查看它们提供的大量有用选项。
Git历史记录的功能 (Features of Git History)
- View the Git history and search history log 查看Git历史记录和搜索历史记录日志
- View previous file updates 查看以前的文件更新
- View the history of a file, line, branches, and authors 查看文件,行,分支和作者的历史记录
- Compare branches, commits, and files across commits 比较跨提交的分支,提交和文件
- Create branches, create tags, reset commits, merge branches, and rebase 创建分支,创建标签,重置提交,合并分支和变基
2. Git责备 (2. Git Blame)
Git Blame is a simple extension that has 640k downloads and gives you information on who to blame for who changed what. (It is kind of rude and comical at the same time. I mean, the name of this extension, after all.) As usual, you can search and download Git Blame from the extensions tab.
Git Blame是一个简单的扩展程序,下载量为640k,可为您提供有关更改内容的责任人信息。 (同时,这有点粗鲁和可笑。毕竟,这个扩展程序的名称。)和往常一样,您可以从扩展程序选项卡中搜索并下载Git Blame。
In Figure 3 below, we can see who made the last change for the file. When we click on it, a new window opens to check the source directly in GitHub. (That means simply whom to blame).
在下面的图3中,我们可以看到谁对文件进行了最后更改。 当我们单击它时,将打开一个新窗口,直接在GitHub中检查源。 (这只是指责谁)。
If you combine this with something like the Git History extension, which we just looked at, you can get your history as well as the actual blame information at a quick glance.
如果将其与我们刚刚看过的Git History扩展之类的东西结合使用,您可以快速查看您的历史记录和实际的责任信息。
3. Git项目经理 (3. Git Project Manager)
What Git Project Manager does is make it really easy for us to work with Git projects. We will be able to open projects via VS Code. We can open them in new instances of VC Code and find just the GitHub projects that we work with on GitHub. As usual, you can download it using VS Code extensions.
Git项目经理所做的就是让我们真正轻松地使用Git项目。 我们将能够通过VS Code打开项目。 我们可以在VC Code的新实例中打开它们,然后仅找到我们在GitHub上合作的GitHub项目。 与往常一样,您可以使用VS Code扩展名下载它。
Using GPM, we can observe the project manager as follows. Then we can open the command palette and type GPM. Then, we can tell it to open a Git project. What it should do iterate through a specific directory or multiple directories and look for all of the projects inside.
使用GPM,我们可以观察项目经理如下。 然后,我们可以打开命令面板并键入GPM。 然后,我们可以告诉它打开一个Git项目。 它应该执行的操作将遍历特定目录或多个目录,并查找其中的所有项目。
GPM的特点 (Features of GPM)
- Refresh projects 刷新项目
- Refresh project folders we need 刷新我们需要的项目文件夹
- Open recent Git projects in our directory 在我们的目录中打开最近的Git项目
4.在GitHub,Bitbucket,Gitlab,VisualStudio.com中打开 (4. Open in GitHub, Bitbucket, Gitlab, VisualStudio.com)
Finding this extension in the extension tab will be a little tricky for you. (Extremely valuable hack: Just copy the name and paste it.) Installing this extension is straightforward once you find it.
在扩展程序标签中找到此扩展程序对您来说有点棘手。 (非常有价值的技巧:只需复制名称并粘贴即可。)一旦找到此扩展程序,安装就很简单。
As a software developer, once you get into nested file systems or huge directories in GitHub, manually searching for an exact file can be tricky.
作为软件开发人员,一旦您进入GitHub中的嵌套文件系统或巨大目录,手动搜索准确的文件可能会很棘手。
What exactly this extension does is simple but helpful. Assume you’ve worked on a file and you just want to see it in GitHub. This extension will find the file for you. What you have to do is right-click on your file, copy the GitHub link which appears, and directly go to it using the browser.
此扩展名的作用很简单,但很有帮助。 假设您已经处理过文件,并且只想在GitHub上查看它。 该扩展名将为您找到文件。 您要做的是右键单击文件,复制显示的GitHub链接,然后使用浏览器直接转到它。
5. GitHub拉取请求和问题 (5. GitHub Pull Requests and Issues)
This extension is one of the most highly recommended extensions by developers. It also got 658K downloads. I recommend this one because managing pull requests became easier for me with it. Installation is again quite straightforward, and it is not hard to find, unlike the previous extension. But to use the extension, you have to sign in to GitHub once they ask you to.
此扩展是开发人员最推荐的扩展之一。 它还下载了658K。 我建议您这样做,因为对我来说,管理拉取请求变得更加容易。 与先前的扩展程序不同,安装同样非常简单,并且不难找到。 但是要使用扩展名,您必须在他们要求时登录GitHub。
我们能做什么 (What we can do)
- Browse PRs and list them via VS code 浏览PR并通过VS代码列出它们
- Review PRs from VS code 查看VS代码中的PR
- Validate PRs from VS code 从VS代码验证PR
- List and browse issues 列出并浏览问题
- Use as an authentication method to GitHub 用作GitHub的身份验证方法
- Create issues from to-do comments 从待办事项中创建问题
- Find users and issues using the @ cards 使用@卡查找用户和问题
For me, this is the coolest extension because PRs are warped and well organized in the development environments.
对我来说,这是最酷的扩展,因为PR在开发环境中经过扭曲且组织良好。
“If you get up in the morning and think the future is going to be better, it is a bright day” — Elon Musk
“如果您早上起来起床,认为未来会更好,那将是光明的一天。” — Elon Musk
6. GitLens (6. GitLens)
GitLens is one of the most popular extensions, with more than 6 million downloads. It supercharges the Git capabilities built into VS Code. One of the key features of this is that it simply helps you to have a better understanding of the code.
GitLens是最受欢迎的扩展程序之一,下载量超过600万。 它增强了VS Code内置的Git功能。 这样做的关键功能之一就是可以帮助您更好地理解代码。
Installing GitLens is quite straightforward, like all other extensions.
像所有其他扩展一样,安装GitLens非常简单。
GitLens的功能 (Features of GitLens)
- Shows the most recent commit and the author when we hover on a line of code 当我们将鼠标悬停在一行代码上时,显示最新的提交和作者
- Includes heat maps for the file 包括文件的热图
- Shows all the recent changes and how they were changed 显示所有最近的更改及其更改方式
- Shows the author and the changed date on the status bar (blame) 在状态栏上显示作者和更改的日期(非常规)
- Can explore revision history for selected lines 可以浏览所选行的修订历史记录
- Can search and visualize commits, branches, tags, and more 可以搜索和可视化提交,分支,标签等
7. Git扩展包 (7. Git Extension Pack)
This extension is one of the commonly used Git extensions. It basically puts all of the above-mentioned things together. I won’t go into detail about this because it’s pretty straightforward, as are all the extensions we have discussed above. Installing Git Extension Pack is super easy, like those above.
该扩展是常用的Git扩展之一。 它基本上将上述所有内容放在一起。 我不会对此进行详细介绍,因为它非常简单,就像上面讨论的所有扩展一样。 像上面一样,安装Git Extension Pack非常容易。
Git扩展包的功能 (Features of Git Extension Pack)
- Git History — view logs, files, and history Git历史记录—查看日志,文件和历史记录
- Project manager — switch between projects 项目经理-在项目之间切换
Git ignore — language support for
.gitignorefilesGit ignore —对
.gitignore文件的语言支持- Open in GitHub, Bitbucket, Gitlab, VisualStudio.com 在GitHub,Bitbucket,Gitlab,VisualStudio.com中打开
- GitLens 吉特伦斯
Once you start using these extensions, you will be able to save your time. Maybe you can have extra time to relax or maybe you can play an extra ping pong match during your work hours (haha).
一旦开始使用这些扩展,就可以节省时间。 也许您可以有额外的时间放松身心,或者您可以在工作时间内参加额外的乒乓球比赛(哈哈)。
If you do not want to use any of these Git extensions anymore, you can easily disable them by following the same method we used to install them. Or else, follow File -> Preferences -> Settings -> Extensions.
如果您不想再使用这些Git扩展中的任何一个,则可以按照与安装它们相同的方法轻松地禁用它们。 否则,请遵循文件->首选项->设置->扩展名。
Thank you!
谢谢!
翻译自: https://medium.com/better-programming/7-amazing-git-extensions-for-vs-code-4a8bd36c074b
vs code git扩展
本文介绍了7款针对Visual Studio Code的出色Git扩展,这些扩展将增强你的Git体验,提高代码版本控制效率。
353

被折叠的 条评论
为什么被折叠?



