fix(submit): Prefer remote.pushDefault #546
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there. I'm just opening this for discussion's sake. I tried out the sweet new
git submitcommand for #545 and found that either I'm misunderstanding how to use it, or it might not be set up correctly to handle the "triangle" or forked remote workflow, as it pushed my branch directly toorigin(this repo) instead of my fork as I had intended.In my case,
masterbranch is trackingorigin/master, but I've gotremote.pushDefaultset toclaytonrcarter, which is my fork. As I understand the current code,git submitwill prefer whatever remote is being tracked by the main branch, in my caseorigin, and will only usepushDefaultif there is no main tracking branch. Unless I'm misreading this, this seems like it might makepushDefaultuseful only before a remote is added ... maybe?Anyway, I'm suggesting that we prefer
pushDefaultover whatever the main branch is using. I tried this out to push this change, and it worked as expected.If this is not correct, please feel free to close and, if you don't mind, give me a little hint about how/why I'm misusing and/or misunderstanding this. Thanks!