Github技巧
大约 1 分钟约 322 字
Github 技巧
1.搜索
github 高级搜索功能
直接打开这里GitHub · Where software is built
或搜索后在搜索页面 language 下方打开(没找到更好的方法)
![image-20220504225139153](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504225139153-165500134904917.png)
更多技巧可查看官方文档:
About searching on GitHub - GitHub Docs
2.查找文件
在主页按“t”:查找文件
![image-20220504225403858](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504225403858-165500134905018.png)
点进源代码后,按“l”:跳转到某一行
![image-20220504225816271](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504225816271.png)
点击行号:
- 复制这行代码
- 生成永久链接
![image-20220504225652318](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504225652318.png)
源代码中按“b”:查看文件的改动记录
![image-20220504225932440](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504225932440-165500134905019.png)
键盘快捷键:
![Picture](https://bitbucket.org/xlc520/blogasset/raw/main/images3/gs-165500134905020.png)
3.阅读代码技巧
代码跳转:
- 下载到本地
- 在线 vscode:仓库详情界面按下“。”键,
![image-20220504230504057](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504230504057-165500134905021.png)
![image-20220504230630070](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504230630070-165500155568446.png)
4.在线运行项目
在项目地址前加上gitpod.io/#/
前缀
https://github.com/nginx/nginx => https://gitpod.io/#/github.com/nginx/nginx
登陆:
![image-20220504230740420](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504230740420.png)
加载:
![image-20220504230844063](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504230844063-165500134905023.png)
运行:
![image-20220504230956747](https://bitbucket.org/xlc520/blogasset/raw/main/images3/image-20220504230956747-165500134905024.png)