Title: Documenting pushdefault config option · Issue #257 · python/devguide · GitHub
Open Graph Title: Documenting pushdefault config option · Issue #257 · python/devguide
X Title: Documenting pushdefault config option · Issue #257 · python/devguide
Description: There seem to be 3 variations of the git push command: Use git push origin branchname and always specify the remote and the branch Use git push -u origin branchname on the first push to set origin as the default and then just use git pus...
Open Graph Description: There seem to be 3 variations of the git push command: Use git push origin branchname and always specify the remote and the branch Use git push -u origin branchname on the first push to set origin ...
X Description: There seem to be 3 variations of the git push command: Use git push origin branchname and always specify the remote and the branch Use git push -u origin branchname on the first push to set origin ...
Opengraph URL: https://github.com/python/devguide/issues/257
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Documenting pushdefault config option","articleBody":"There seem to be 3 variations of the `git push` command:\r\n1. Use `git push origin branchname` and always specify the remote and the branch\r\n2. Use `git push -u origin branchname` on the first push to set `origin` as the default and then just use `git push`\r\n3. Set the `pushdefault` to `origin` in `.git/config` and just use `git push`\r\n\r\nThe first method is the one suggested in the devguide \r\n(e.g. in the [submitting section](https://devguide.python.org/pullrequest/#submitting)); the second is also documented in the [pushing changes section](https://devguide.python.org/committing/#pushing-changes); the third is apparently somewhat recent and not yet documented.\r\n\r\nThe pushdefault is configured by adding to `.git/config`:\r\n```\r\n[remote]\r\n pushdefault = origin\r\n```\r\nWhere `origin` refers to the user's fork of cpython. AFAICT almost all the pushes should go to `origin`.\r\n\r\nEach method has pros and cons:\r\n\r\nFirst method:\r\n* pros: explicit is better than implicit\r\n* cons: longer to type, harder to remember, could get the arg names/order wrong\r\n\r\nSecond method:\r\n* pros: still explicit but shorter to type for the following pushes\r\n* cons: same as above but only applies to the first push on each branch\r\n\r\nThird method:\r\n* pros: easier to remember, shorter to type, works like `hg push`\r\n* cons: less explicit\r\n\r\nThe question is: which one should we adopt as the recommended method?\r\n\r\n","author":{"url":"https://github.com/ezio-melotti","@type":"Person","name":"ezio-melotti"},"datePublished":"2017-09-04T23:27:02Z","url":"https://github.com/python/devguide/issues/257"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0daad451-d2fc-6182-4d72-7b0195bcdc23 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF68:A70A9:1324A6F:1954578:6B01EECD |
| html-safe-nonce | e3ced7bf69c80c3f0596080468877ce1815a0edb70192dc79feb930fd2133a40 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjY4OkE3MEE5OjEzMjRBNkY6MTk1NDU3ODo2QjAxRUVDRCIsInZpc2l0b3JfaWQiOiI4MjUzNTIxNzI0MDMzODU1MTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 35000cb3f016f9bc150de98d0f8cf18cedf774ff0a09ee43bba4d24cea9c378c |
| hovercard-subject-tag | issue:255128186 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/devguide/257/issue_layout |
| twitter:image | https://opengraph.githubassets.com/39ea95eddef23ccdee75448124c2efa9f58dd0b6d1be9ba8e7cc5c35e8aedb8e/python/devguide/issues/257 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/39ea95eddef23ccdee75448124c2efa9f58dd0b6d1be9ba8e7cc5c35e8aedb8e/python/devguide/issues/257 |
| og:image:alt | There seem to be 3 variations of the git push command: Use git push origin branchname and always specify the remote and the branch Use git push -u origin branchname on the first push to set origin ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ezio-melotti |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/devguide git https://github.com/python/devguide.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 63972479 |
| octolytics-dimension-repository_nwo | python/devguide |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63972479 |
| octolytics-dimension-repository_network_root_nwo | python/devguide |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width