在下面的简化示例中,我有一个将提交推到dev分支的模式:
git status // Let's see what I did
git add . // I want to commit all my changes
git commit -m "I did a thing" // I commit with a message
git pull --rebase origin dev // I am trying to avoid a merge conflict
git status // I am really ready to push, right?
git push origin dev // I am pushing to github现在我没有发现模式有什么问题(也许我应该这样做?),但是我想快速删除到我提交的github URL的链接。
理想的输出,我猜应该是类似于改变这个git push输出:
To https://github.com/MyGithub/MyRepo
aaa0001..aaa0000 dev -> dev至
To https://github.com/MyGithub/MyRepo/path/to/latest/commit
aaa0001..aaa0000 dev -> dev发布于 2018-11-29 19:19:52
你在用bash吗?推送后如何使用git log的输出?
$ echo https://github.com/user/project/commit/$(git log --format="%H" -n 1)
https://github.com/user/project/commit/7e30ecbffa4ce37d0cb9e2d10682ce8fa0b24e4bhttps://stackoverflow.com/questions/53545846
复制相似问题