git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Parallell Development / Switching to GIT

From
Jeff King <peff@peff.net>
Date
Jun 30, 2009, 05:32 UTC
Message-ID
<20090630053252.GA29643@sigio.peff.net>
In-Reply-To
<B81058949321C8439B9D742F5F8D8FCA01A75C33@hpserver.intranet.local>
On Sun, Jun 28, 2009 at 10:08:45PM +0200, Patrick Neuner - Futureweb.at wrote:
Show 14 quoted lines
> I read about cherry-picking, but I am not quite sure if that's really
> what we need.  Lets assume, you do a new feature:
>
> /featureX
>
> You will commit it, check it out on the testserver and probably see a
> bug, fix it, commit and push it again. (and probably more commits
> after the testing person ran over other issues).
>
> With cherry-picking, I would need to know all commits I have to pick.
> But as there have been serveral commits, so wouldn't it be a pain to
> check all commits to that file or directory to have the same version?
>
> Just trying to find the right way to handle that.

I don't quite understand what you are asking. You make some commits pushing a new feature forward. While testing, you see some bugs. You fix the bugs and make new commits. Now you realize you want those bugfixes on some other branch. So you cherry-pick them away. Yes, you have to figure out which commits you want. You can use "git log" or "git log <set of files>" to look through the list of commits and pick them out.

When you say "wouldn't it be a pain to check all commits to that file or directory to have the same version?" I can't quite parse what you are trying to say. Can you rephrase it?

> Do you talk about to different clones of the rep, and give different directory permissions on it, 
> or is there a way to have like to completly different git rep's running and still merge things over (both ways)?
> I just thought this approach would break correct mergin, as it doesn't know where it's comming from. 

No, it doesn't break merging at all. You will have two different repositories, but they may actually contain quite a similar subset of commits. That subset will be the shared part of the history graph, and then each one will have commits on top. Periodically features from development will get merged to master, which will make those merged bits part of the shared history.

To git, two branches in the same repo is exactly the same as two repos, each with its own branch.

Show 5 quoted lines
> The only thing I ran over so far is probably doing a hook for that
> (like a pre-pull hook if that exists). didn't get to read too much
> about hooks yet, just did the update hook that checks if the user with
> specific ssh key is allowed to push to a specific branch. That works
> pretty good and is more important in fact.
Yes, that is the hook you would need, but it doesn't exist yet.
> But having 2 completly different repos would be another solution, but
> I kinda wonder that mergin would work correctly this way (if both
> sides have changes). 

Of course it is still possible to have merge conflicts, but it is no different than merging two branches from the same repository.

-Peff
Previous: Johannes Sixt
Message 13 of 13 in “Parallell Development / Switching to GIT”
  1. Patrick NeunerJun 25, 2009
  2. Andreas EricssonJun 25, 2009
  3. AW: Parallell Development / Switching to GITPatrick Neuner - Futureweb.at, Jun 28, 2009
  4. Jeff KingJun 28, 2009
  5. AW: Parallell Development / Switching to GITPatrick Neuner - Futureweb.at, Jun 28, 2009
  6. David AguilarJun 28, 2009
  7. Andreas EricssonJun 29, 2009
  8. Peter HarrisJun 29, 2009
  9. AW: AW: Parallell Development / Switching to GITPatrick Neuner - Futureweb.at, Jul 2, 2009
  10. Johannes SixtJul 2, 2009
  11. AW: AW: AW: Parallell Development / Switching to GITPatrick Neuner - Futureweb.at, Jul 2, 2009
  12. Johannes SixtJul 2, 2009
  13. Jeff KingJun 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.