【问题标题】:How to automate git commands如何自动化 git 命令
【发布时间】:2016-09-23 02:34:25
【问题描述】:

有没有办法编写脚本来自动运行 git 命令?例如,如果我在终端中,有没有办法可以运行类似于以下的命令:

run git push 会自动为我运行命令:

git add .

git commit -m 'wip'

git push origin

等等

【问题讨论】:

  • 我认为这个github 项目就是你要找的。​​span>

标签: git bash macos


【解决方案1】:

当然,你可以编写一个 shell 脚本来执行你想要的命令,或者你可以创建一个像 git config --global alias.p '!git add . && git commit -m "wip" && git push origin' 这样的 git 别名,以便以后能够运行 git p

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-22
    • 1970-01-01
    • 2017-05-09
    • 1970-01-01
    • 1970-01-01
    • 2012-10-31
    • 1970-01-01
    相关资源
    最近更新 更多