Documenting pushdefault config option
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 2.1k
- 派生
- 1k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 12
描述
There seem to be 3 variations of the git push command:
- Use
git push origin branchnameand always specify the remote and the branch - Use
git push -u origin branchnameon the first push to setoriginas the default and then just usegit push - Set the
pushdefaulttooriginin.git/configand just usegit push
The first method is the one suggested in the devguide
(e.g. in the submitting section); the second is also documented in the pushing changes section; the third is apparently somewhat recent and not yet documented.
The pushdefault is configured by adding to .git/config:
[remote]
pushdefault = origin
Where origin refers to the user's fork of cpython. AFAICT almost all the pushes should go to origin.
Each method has pros and cons:
First method:
- pros: explicit is better than implicit
- cons: longer to type, harder to remember, could get the arg names/order wrong
Second method:
- pros: still explicit but shorter to type for the following pushes
- cons: same as above but only applies to the first push on each branch
Third method:
- pros: easier to remember, shorter to type, works like
hg push - cons: less explicit
The question is: which one should we adopt as the recommended method?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
查看 devguide 中链接的 submitting 和 pushing changes 部分,以及 .git/config 中的 pushdefault 示例。比较文档中介绍的三种工作流,确定指南应推荐哪种方法,然后更新相关文档,明确这一选择及其设置方式。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100