git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best "triangle" workflow setup?
@ 2017-05-11 19:41 Robert Dailey
  2017-05-11 20:17 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Dailey @ 2017-05-11 19:41 UTC (permalink / raw)
  To: Git

I know Git has evolved to support the "triangle" workflow model in
different ways, with the goal of making it better. However because
there are so many different options from separate push URLs for
remotes to various ways to manage tracking branches, it's not clear to
me which specific configuration suits this workflow the best.

So my situation is that I have 3 repositories: The original upstream
repository, a fork of that repository (also remote), and my local
clone of the upstream repository.

What I want (as a default) is for `git pull` to pull from the
same-named branch on the upstream repository, but for `git push` to
push to the same-named branch on the fork repository. However to
override this behavior for when I want to push directly to upstream
repo, I should be able to use an explicit `git push origin my-topic`
(but `git push` by default will act as `git push fork my-topic`).

What is the best way to achieve this? Is there a different workflow
from what I'm imagining that works a little better (in other words, I
don't need it to work *exactly* as I've described, mainly I just want
to avoid accidentally pushing changes to the upstream repo in the
default case when I want to push to the fork instead for pull
request)?

Thanks in advance for any advice.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-13  6:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 19:41 Best "triangle" workflow setup? Robert Dailey
2017-05-11 20:17 ` Jeff King
2017-05-11 21:23   ` Robert Dailey
2017-05-11 23:36     ` Jeff King
2017-05-12 14:53       ` Robert Dailey
2017-05-13  6:43         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).