惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - Sameen

上下文工程学习笔记 什么是vibe ? 什么是 embedding ? angular中asObservable是什么的,为什么需要用? vscode问题 document cookie JavaScript中的Date squash merge Element.scrollIntoView requestIdleCallback angular学习笔记 [转]React hooks useEffect中如何使用异步函数(即如何使用async/await) css斜条纹背景——linear-gradient 【转】过滤不可见字符 换电脑快捷同步vscode插件和配置 Mac上看不到.git目录下的隐藏文件的解决方法 ts 问号点 ?. moment获取本月、上个月、近三个月时间段 iframe优缺点
Git自动补全配置安装(Mac版本)
Sameen · 2021-06-07 · via 博客园 - Sameen

首先要安装 bash-completion,看一下自己的bash命令是否可以补全,如果不行要先安装bash-completion

brew install bash-completion
下载git源码
使用如下命令即可下载

git clone https://github.com/git/git
复制 git-completion.bash
源代码下有个 contrib/completion 目录,有个 git-completion.bash 文件

cd git/contrib/completion/
将该文件复制到主目录(~)下。注意:复制时,文件名前加一个"点"(.),命令如下:
cp git-completion.bash ~/.git-completion.bash
修改主目录下的 .bashrc 文件(如果没有该文件,新建一个)。添加一行代码
source ~/.git-completion.bash
 

将下面代码添加到~/.bash_profile(如果没有该文件,新建一个)。

# git auto completition
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
然后,source一下使其生效

source ~/.git-completion.bash
source ~/.bash_profile
这样就可以,按下Tab键就可以提示啦。(如果还不可以,重启终端试试)

$ git che
checkout cherry cherry-pick

切换mac shell:

https://support.apple.com/zh-cn/HT208050