On Monday, August 29, 2016 11:33:32 AM 'Shawn Pearce' via
Repo and Gerrit Discussion wrote:
> > I can't tell for certain - does this method require
> > naming your branch the same as your push destination?
> > That is a bit of a bummer, a lot of docs have examples
> > with more descriptive names (bug183, newFeature, etc).
> > Maybe not a big deal though.
>
> Instead of:
>
> git checkout -b bug183
>
> You would do:
>
> git checkout -b @master/bug183
>
> So encode the destination into the prefix for your local
> branch name.
I am probably not the person to optimize a workflow for, but
here is my perspective:
Personally, I would not find this useful. I work on my local
branches much more than I do on my remote branches, and I
would not want the extra burden of encoding the remote
branch name in my local branches.
When developing something new, I often create many copies of
a local branch, many named silly things like feature,
feature.1 feature.2 feature.3 feature3.rebased ... (all for
the same feature as it evolves). I am effectively
manipulating many copies of the same local branch and
keeping backups of my old designs. In my case, this would
mean having to either name all those backup copies above
with the destination @master/feature @master/feature1
@master/feature2 @master/feature3 @master/feature.rebased
... or rename the final "ready" branch from feature to
@master/feature right before pushing. I see little gain in
that.
Generally speaking, pushing for review is a command I run
rarely compared to the amount of times I manipulate local
branch names. Local branch operations are thus what I want
my workflow optimized for. If I have to think a little
before pushing for review (to add refs/for/master) first,
that is good. It will force me to pause before pushing and
making sure I am really ready to push, and that I am pushing
to the right destination (internal vs external...),
-Martin
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation