Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iTerm2中,Macbook触控栏在Git环境下的妙用 #13

Open
wangmeijian opened this issue Sep 8, 2022 · 0 comments
Open

iTerm2中,Macbook触控栏在Git环境下的妙用 #13

wangmeijian opened this issue Sep 8, 2022 · 0 comments

Comments

@wangmeijian
Copy link
Owner

wangmeijian commented Sep 8, 2022

你可以直接在touch bar中使用git status, git add ., git commit -m "", git pull, git push, git switch main,git switch mastergit switch develop,只需要点击一下就行,非常方便

配置非常简单,但在第一次尝试时可能需要一些时间才能弄清楚

打开iTerm2,选择菜单iTerm2 -> Preferences -> Keys

preferences

然后选择Add Touch Bar Item,输入git status,选择Send text with vim special chars,然后在底部字段中写入git status\n,点击OK完成添加

add_touch_bar_item

对您想要的所有其他 git 命令重复此操作。在底部字段中输入git commit -m ""\u0002,这会将文本git commit -m ""发送到控制台,然后发送一个左箭头,使光标位于引号内,然后您可以编写提交消息并按下回车提交

然后选择View -> Customize Touch Bar...并将新命令拖到触摸栏

就这些!希望对你有帮助

原文链接:https://refruity.xyz/macbook-touch-bar-in-iterm2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant