github 生产环境

by Darren Burns

达伦·伯恩斯(Darren Burns)

如何在GitHub上提高生产力 (How to be more productive on GitHub)

With the recent announcement by GitHub of unlimited private repositories, let’s take a few minutes before we push our code we don’t want anyone else to see to the cloud, and make sure we’re making the most of what GitHub has to offer.

GitHub最近发布了无限的私有存储库 ,让我们花几分钟时间在发布代码之前,不要让其他人看到云,并确保我们充分利用GitHub所提供的功能。

GitHub is built with some extremely helpful shortcuts and productivity-boosting features. From personal experience, however, it’s clear that these often fall under the radar amongst developers.

GitHub具有一些非常有用的快捷方式和提高生产力的功能。 但是,从个人经验来看,很明显,这些通常会在开发人员中受到关注。

If I’ve ever witnessed a specific GitHub feature surprise or assist someone, it’s on this page. That said, what follows is by no means an exhaustive list.

如果我目睹过某个特定的GitHub功能令人惊讶或为某人提供了帮助,请访问此页面。 也就是说,以下内容绝不是详尽的清单。

在存储库中快速进行模糊文件搜索 (Quick fuzzy file search in repositories)

This is, without doubt, the fastest way to browse a repository when you know what you’re looking for. Open up any repository and press t. You can now search for the name of any file in the repository, and use the arrow keys on your keyboard to move through the results. Press Enter to open the file.

毫无疑问,这是您知道要查找的内容时浏览存储库的最快方法。 打开任何存储库,然后按t 。 现在,您可以在存储库中搜索任何文件的名称,然后使用键盘上的箭头键在结果中移动。 按Enter打开文件。

拉取请求中的代码更改建议 (Code change suggestions in pull requests)

When commenting on a piece of code in a pull request, you can suggest alternative code using the “Suggested Changes” feature. The author of the pull request will be able to apply your suggestion instantly without leaving GitHub. To make the suggestion, surround a code snippet with a multi-line Markdown snippet and add the tag “suggestion”:

在请求请求中注释一段代码时,您可以使用“建议的更改”功能建议其他代码。 拉取请求的作者将能够立即应用您的建议,而无需离开GitHub。 要提出建议,请在代码段周围加上多行Markdown代码段,并添加标签“ suggestion”:

Now that you’ve made the suggestion, the author of the pull request can immediately apply it to their branch, without the hassle of manually changing the file!

现在,您已经提出了建议,pull请求的作者可以立即将其应用于其分支,而无需手动更改文件!

像在IDE中一样浏览代码树 (Navigate the code tree like in an IDE)

This one requires an unofficial Chrome extension, but it’s a slightly more familiar way to navigate your code, compared to the default interface. The Octotree extension lets you browse GitHub repositories with a sidebar tree view similar to what you get in applications like VS Code.

这需要一个非官方的Chrome扩展程序,但是与默认界面相比,它是一种稍微熟悉些的代码浏览方式。 Octotree扩展使您可以使用侧边栏树状视图浏览GitHub存储库,类似于在VS Code等应用程序中获得的视图。

查看代码时跳转到功能 (Jump to a function when reviewing code)

Unless you’re reviewing a single function, a code review often involves a lot of jumping between function calls and their definitions (and therefore a lot of scrolling up and down). GitHub lets you jump to a symbol by pressing t when you’re looking at files in a pull request.

除非您查看单个功能,否则代码查看通常会涉及到函数调用及其定义之间的大量跳转(因此,会导致上下滚动)。 在查看拉取请求中的文件时,GitHub允许您通过按t跳至符号。

创建到文件的永久链接 (Creating a permalink to a file)

When viewing a file or directory, press y, and the URL will be converted to a permalink, which you can share safely in the knowledge that the contents of the file will never change.

查看文件或目录时,按y ,URL将被转换为永久链接,您可以安全地共享该链接,前提是文件的内容永远不会改变。

If you send a link to a file or directory on GitHub without making it into a permalink, you’ll need to accept the possibility that the file could disappear tomorrow, breaking the link!

如果您将链接发送到GitHub上的文件或目录而没有使其成为永久链接,则您需要接受该文件明天可能消失并断开链接的可能性!

查看责任和更改新近度热图 (Viewing the blame and change recency heatmap)

When viewing a file, you can press b to view the Git blame and a heatmap showing how recently each line was changed. It’ll tell you who most recently changed each line of code, and give you a clickable link taking you to the full commit the change was part of.

查看文件时,您可以按b键查看Git责备和一个热图,该热图显示每行的更改时间。 它会告诉您最近谁更改了每一行代码,并提供了一个可单击的链接,使您可以进行更改的完整提交。

On the right-hand side of the gutter (which contains the commit message and author), you’ll notice an orange vertical bar. The more vivid this bar is, the more recent the change, meaning you can easily scan the file to find the freshest code!

在装订线的右侧(包含提交消息和作者),您会注意到橙色的竖线。 该栏越生动,说明更改越新,这意味着您可以轻松地扫描文件以找到最新的代码!

强大的代码搜索 (Powerful code search)

GitHub indexes most code and offers powerful search functionality over it. If you need to find something in a repository, but don’t plan on making any changes to it. There’s usually no need to check the repository out. Press /to search all the code in the repository.

GitHub将大多数代码编入索引,并提供强大的搜索功能。 如果您需要在存储库中找到某些内容,但是不打算对其进行任何更改。 通常无需检出存储库。 按/搜索存储库中的所有代码。

If your search contains multiple words and you want to search for occurrences of your specific search query, put the quotations around the query. You can filter your searches by other things too, such as file size, extension, the path the file is on, and much more.

如果您的搜索包含多个单词,并且要搜索特定搜索查询的出现次数,请在查询前后加上引号。 您还可以通过其他内容来过滤搜索,例如文件大小,扩展名,文件所在的路径等等。

保存的回复 (Saved replies)

If you ever find yourself repeating the same comments, you’ll save some time by creating a saved reply. The next time you find you’re going to type that comment again, you can instead just select it from a drop-down menu:

如果您发现自己重复了同样的评论,可以通过创建保存的回复来节省一些时间。 下次发现要再次键入该评论时,您可以从下拉菜单中选择它:

To perform the above action without using my mouse, I can do ctrl + / followed by ctrl+ 1.

不使用我的鼠标执行上述动作,我可以做ctrl + /随后ctrl + 1

结论 (Conclusion)

Thanks for reading. I hope you found at least one thing on this page that will make you a more productive GitHub user. If you enjoyed this post or have any feedback in general, let me know!

谢谢阅读。 希望您在此页面上找到至少一件事,这将使您成为更有效率的GitHub用户。 如果您喜欢这篇文章或总体上有任何反馈意见,请告诉我!

If you’re interested in more content like this, follow me on Twitter.

如果您对类似这样的更多内容感兴趣,请在Twitter上关注我。

Originally posted on my blog.

最初发布在我的博客上 。

P.S. You can make your own Octocat for sharing like the one in the cover photo at myoctocat.com!

PS:您可以像myoctocat.com封面照片中的照片一样制作自己的Octocat进行共享!

翻译自: https://www.freecodecamp.org/news/how-to-be-more-productive-on-github-c3cedab043e3/

github 生产环境

github 生产环境_如何在GitHub上提高生产力相关推荐

  1. firebase连接不上_如何在Firebase上托管Blazor应用程序

    firebase连接不上 介绍 (Introduction) In this article, we will learn how to deploy a Blazor application on ...

  2. heroku服务器_如何在Heroku上使用Express服务器部署React应用

    heroku服务器 by Ashish Nandan Singh 通过Ashish Nandan Singh 如何在Heroku上使用Express服务器部署React应用 (How to deplo ...

  3. github在线执行_什么是Github操作,如何自动执行测试和Slack通知?

    github在线执行 Automation is a powerful tool. It both saves us time and can help reduce human error. 自动化 ...

  4. java安装_如何在 Mac 上安装 Java | Linux 中国

    macOS 用户可以运行 Java 的开源版本,以及用于云原生开发的新框架. 来源:https://linux.cn/article-12393-1.html 作者:Daniel Oh 译者:MCGA ...

  5. asp.net web开发步骤_如何在Windows上做Python开发?微软出了官方教程

    机器之心报道 参与:路 在 Windows 上做 Python 开发太痛苦?微软最近发布了一系列官方教程,终于-- 教程地址:https://docs.microsoft.com/zh-cn/wind ...

  6. github密码格式_如何使用GitHub构建一个简单的网页 (不用框架版本)

    1.申请GitHub账号 进入GitHub官网,点击右上角的Sign up进行注册, 注册很简单,只要填写好用户名,邮箱,密码就行(已注册的用户名,邮箱不能再进行注册) 下面有一个你是人类的验证(照着 ...

  7. 怎么抓python程序的包_如何在AWS上部署python应用程序

    如何在AWS上部署python应用程序,学姐呕心沥血亲自总结,亲测有效,比网上看网上大把大把的文档要快得多! 作者:蕾学姐 亚马逊云计算服务(Amazon Web Services,缩写为AWS),由 ...

  8. macos必做的设置_如何在MacOS上设置PHP,CaddyServer和Kirby —以及为什么要这样做

    macos必做的设置 by Philipp Haidenbauer 菲利普·海登鲍尔(Philipp Haidenbauer) 如何在MacOS上设置PHP,CaddyServer和Kirby -以及 ...

  9. 性能测试测试环境与生产环境_不在生产中测试? 在生产中进行测试!

    性能测试测试环境与生产环境 如果您上一次更新IT安全标准是在5年前或更早,那么它们很可能与当今的DevOps和站点可靠性工程 (SRE)实践的现状不符. 一个特别棘手的话题是生产中的测试,以及因此使用 ...

最新文章

  1. AB1601低功耗之IIC和PWM控制注意事项
  2. 详细讲解Hyper-V虚拟机的网络配置
  3. 【NLP】文本分类还停留在BERT?对偶比学习框架也太强了
  4. asp.net mvc 重定向
  5. 机器学习(machine learning)之AdaBoost算法
  6. Docker-machine创建虚机时停在虚机启动的提示上,并且创建的虚机显示Ip Not found...
  7. 2020蓝桥杯省赛---java---B---7(单词分析)
  8. [html] 如何使用H5唤起原生地图APP(百度、高德、腾讯地图等)
  9. 配置文件存int类型_Redis详解(五)------ redis的五大数据类型实现原理
  10. 动作类游戏状态机设计
  11. 7-1 两个有序链表序列的合并 (15 分)
  12. python实践项目(九)
  13. Shell脚本里的双冒号是什么意思
  14. 大一新生 电脑小白如何选择电脑 电脑知识全面讲解
  15. 人工智能导论(数据挖掘)
  16. 《山海经》第一卷(南山经)南山一经
  17. 摊铺机基本参数介绍(鼎盛天工WTD9501A)
  18. mysql源生插入数据_php+mysql源生连接数据库和增删改查数据
  19. Elasticsearch在各大互联网公司的应用案例
  20. 医学统计学第三版 前三章(绪论、调查研究设计、试验研究设计)

热门文章

  1. leetcode算法—无重复字符的最长子串 Longest Substring Without Repeating Characters
  2. Java—switch case实现两个数的算术运算
  3. 字段与属性 关于类的封装 c# 1229
  4. 9203-1204-抄写
  5. 登陆窗体相关的控件 1124
  6. linux-vim-文本编辑
  7. python-演练-输出一个等腰三角形-
  8. usermod使用方法
  9. 深入理解Redis系列之SpringBoot集成Redis
  10. sonar工具使用常见问题解决