如何对这3个命令进行分组:
git initgit add .git commit -m "Initialize repository"我当然有这个,但如果存在,我正在寻找更短更优雅的东西:
me@local:~$ git init; git add .; git commit -m "Initialize repository"
Run Code Online (Sandbox Code Playgroud)
创建别名:
git config --global alias.here '!git init . && git add . && git commit --allow-empty -m "Initialize repository"'
Run Code Online (Sandbox Code Playgroud)
那就像使用它一样
git here
Run Code Online (Sandbox Code Playgroud)
请注意,我添加了--allow-empty选项git commit,这将使其在空目录和包含内容的目录中工作.
| 归档时间: |
|
| 查看次数: |
3428 次 |
| 最近记录: |