确认git push命令 [英] Confirmation of git push command

查看:186
本文介绍了确认git push命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在具体分支上配置对git push命令的确认?我有生产部门,有时我忘记了我在生产部门,并没有推动这些改变。

How I can configure some confirmation on git push command in concrete branch? I have production branch and sometimes I forgot that I in production branch and push not those changes.

推荐答案

一个潜在的解决方案是删除与'production'分支相关的配置。

One potential solution would be to remove the config associated with 'production' branch.

git config --unset branch.<branch>.remote
git config --unset branch.<branch>.merge

通过这种方式,您可以提及要从哪个远程位置提取(或推送到)
如果你为拉的定义了一个别名:

That way, you have to mention to what remote you want to pull from (or push to, for that matter).
If you define an alias for the pull which:



  • ,然后删除该分支的远程和合并配置,

您确定无法使用,对于那个分支,做一个简单的git pull而不输入其他参数。

you are sure you will not be able, for that branch, to do a simple "git pull" without entering additional parameters.

这篇关于确认git push命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆