Re: Managing multiple branches in git

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Re: Managing multiple branches in git
Дата
Msg-id 4A2689CC.4080900@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Managing multiple branches in git  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas wrote:
> The problem with making each release a separate directory is that,
> just like using separate repositories, it will defeat one of the main
> strengths of git, which is the ability to move around commits easily.
> git-new-workdir is the only solution to the problem of having multiple
> branches checked out simultaneously that seems like it might not
> suffer from that weakness.

While I agree "git-new-workdir" is best for typical postgres workflows
so I won't dwell on separate-repositories beyond this post - but I
think you overstate the difficulty a bit.


It seems it's not that hard to cherry-pick from a remote repository by
setting up a temporary tracking branch and (optionally) removing it
when you're done with it if you don't think you'll need it often.

From: http://www.sourcemage.org/Git_Guide
$ git checkout --track -b <tmp local branch> origin/<remote branch>
$ git cherry-pick -x <sha1 refspec of commit from other (local or remote) branch>
$ git push origin <tmp local branch>
$ git branch -D <tmp local branch>

And if you know you'll be moving patches between external repositories
like "origin/<remote branch>" often, ISTM you don't have to do the first and
last steps (which create and remove the tracked branch) each time; but rather
leave the local tracking branch there.



IMVHO, Moving commits around across *different* remote repositories is
also one of the main strengths of moving to a distributed VCS.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: display previous query string of idle-in-transaction
Следующее
От: Aidan Van Dyk
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up