Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documenting pushdefault config option #257

Open
@ezio-melotti

Description

@ezio-melotti

There seem to be 3 variations of thegit push command:

  1. Usegit push origin branchname and always specify the remote and the branch
  2. Usegit push -u origin branchname on the first push to setorigin as the default and then just usegit push
  3. Set thepushdefault toorigin in.git/config and just usegit push

The first method is the one suggested in the devguide
(e.g. in thesubmitting section); the second is also documented in thepushing changes section; the third is apparently somewhat recent and not yet documented.

The pushdefault is configured by adding to.git/config:

[remote]    pushdefault = origin

Whereorigin refers to the user's fork of cpython. AFAICT almost all the pushes should go toorigin.

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 likehg push
  • cons: less explicit

The question is: which one should we adopt as the recommended method?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp