博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git 命令行提交_通过命令行获取Git提交ID
阅读量:2513 次
发布时间:2019-05-11

本文共 931 字,大约阅读时间需要 3 分钟。

git 命令行提交

I know just enough git to be dangerous.  I'm not doing advanced bisecting but I can stash, rebase, and reset with the best of them.  One new trick I learned from , Luke Crouch, saves me loads of time:  getting the commit ID via command line.  For years I would merge a PR, go the project's main page, and copy the commit ID so that I could push code to staging and production.  Always seemed like an extra step rather than just making it happen from the terminal.  Here's the magical command:

我知道git够危险。 我没有进行高级二等分,但是我可以利用它们中的最好的东西进行存储,变基和重置。 我从卢克·克劳奇(Luke Crouch)那里学到的一个新技巧为节省了很多时间:通过命令行获取提交ID。 多年来,我会合并PR,转到项目的主页,然后复制提交ID,以便将代码推送到暂存和生产环境。 似乎总是一个额外的步骤,而不仅仅是在终端上实现它。 这是神奇的命令:

git rev-parse HEAD

Of course you need to update your local repo to remote master, but you do that anyway, right?  Hopefully this will become a timesaver the same way it has for me!

当然,您需要将本地存储库更新为远程主数据库,但是您还是要这样做,对吗? 希望这对我来说将成为一种节省时间的方式!

翻译自:

git 命令行提交

转载地址:http://rkpwd.baihongyu.com/

你可能感兴趣的文章
zoj2112 主席树动态第k大 ( 参考资料链接)
查看>>
弹出框popupWindow
查看>>
Python学习(007)-函数的特性
查看>>
扑克牌的顺子
查看>>
nodejs + express 热更新
查看>>
ClientScriptManager.RegisterClientScriptBlock Method 无效
查看>>
asp.net web site中reference的version的autoupdate
查看>>
第4章 网络层
查看>>
volatile
查看>>
项目需求分析答辩总结
查看>>
mysql-6正则表达式
查看>>
廖雪峰Java2面向对象编程-5包和classpath-1包package
查看>>
廖雪峰Java7处理日期和时间-3java.time的API-1LocalDateTime
查看>>
利用golang语法检查对象是否实现了接口
查看>>
在UBUNTU上安装基于bochs的 xv6
查看>>
Azure Storage Blob文件重命名
查看>>
RxJava2.0 使用
查看>>
FreeImage的图像处理软件
查看>>
ASP.NET MVC开发必看系列
查看>>
点到平面的距离
查看>>