Documenting pushdefault config option
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 12
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked devguide submitting and pushing changes sections, along with the .git/config pushdefault example. Compare the three documented workflows and determine which method the guide should recommend, then update the relevant documentation to make that choice and its setup clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100