git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linear history *and* share a branch?
@ 2012-04-05 20:48 Hilco Wijbenga
  2012-04-05 20:56 ` Ævar Arnfjörð Bjarmason
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Hilco Wijbenga @ 2012-04-05 20:48 UTC (permalink / raw)
  To: Git Users

Hi all,

We have been using Git for about a year now in a very small team. So
far, everyone has worked on their own local branches and been doing
"git rebase master" to make sure their local branches stay in synch.
This way we have a nice linear history in master.

Recently, it has become useful to share one of these local branches
between two devs. Of course, when one of the devs does his usual "git
rebase master", he screws up the other dev's environment. Our solution
has been to keep rebasing the shared branch but to actually work on a
local branch that is rebased on the shared branch. By judiciously
using "git reset" and "git pull" on the shared branch the two devs can
keep the shared branch in synch and then use "git rebase
shared-branch" on their local branch to keep it in synch to. While
this works, there is probably a better/simpler solution.

Should we simply do "git merge master" instead of "git rebase master"?
And then do something at the end when we are about to merge the shared
branch back into master to guarantee linear history? Your thoughts and
ideas would be greatly appreciated.

Cheers,
Hilco

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

end of thread, other threads:[~2012-04-10 23:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 20:48 Linear history *and* share a branch? Hilco Wijbenga
2012-04-05 20:56 ` Ævar Arnfjörð Bjarmason
2012-04-06 10:04   ` Ævar Arnfjörð Bjarmason
2012-04-05 21:06 ` Junio C Hamano
2012-04-05 21:57   ` Hilco Wijbenga
2012-04-06  2:44 ` Michael Witten
2012-04-10 23:54 ` Neal Kreitzinger

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).