Page MenuHomePhabricator

Update 'git push' command in GettingStarted guide
Needs ReviewPublic

Authored by dcaballe on Thu, May 14, 1:42 PM.



'git push' command, without any other arguments, can do different
things depending on the local configuration of Git. However, it
won't push your local 'arcpatch-D<Revision>' to the remote 'master'
branch by default. This patch updates the 'git push' command with
the extra arguments needed to commit 'arcpatch-D<Revision>' to the
remote 'master' branch.

Diff Detail

Event Timeline

dcaballe created this revision.Thu, May 14, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptThu, May 14, 1:42 PM
mehdi_amini added inline comments.Thu, May 14, 9:21 PM

The generic way of pushing would rather be I believe: git push origin HEAD:master what about using this instead? It is closer to ensuring you're pushing what you just tested (we should like tell folks to check that their local state is clean as well)

(note that origin is read-only locally for me, but I assume that for such doc we can assume a "default" setup)

echristo added inline comments.


dcaballe marked an inline comment as done.Thu, May 14, 10:52 PM
dcaballe added inline comments.

It sounds good! I'll give it a try in my next commit and change it. Thanks!

dcaballe updated this revision to Diff 265104.Tue, May 19, 5:47 PM

Changing to git push origin HEAD:master

tstellar added inline comments.

I would even take this a step further and replace origin with the full repo name e.g.

git push HEAD:master

I think the documentation should give instructions that are guaranteed to work regardless of the user's configuration.

dcaballe updated this revision to Diff 265288.Wed, May 20, 9:51 AM

It sounds good, thanks.
Replacing 'origin' with '' in git pull and push commands.