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

Re: Fork or branch?

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Apr 21, 2011, 18:33 UTC
Message-ID
<20110421183320.GA17298@dpotapov.dyndns.org>
In-Reply-To
<1303390999618-6293910.post@n2.nabble.com>
On Thu, Apr 21, 2011 at 06:03:19AM -0700, adam_kb wrote:
> I am new to git and understand most of it except for merge. My question is -
> if I have project X on branch master and its coded in python but I then want
> to take that same project and code it in say C or C++ would I fork or branch
> the project? 

It depends whether you want to have separate repositories (with separate working tree) or you want to have in the same repository. Actually, it does not matter all that much what decision you make now, you can always change that later -- it is very easy to unite two repositories in one, and, on contrary, it is always possible to split branches. Obviously, if you split branches having some common commits, each clone will have them.

Personally, if I re-wrote some Python code in C or C++, I would probably make a separate clone just to have two working tree. If necessary, it is possible to merge changes between them using 'git pull'.

Dmitry
Previous: Jakub NarebskiNext: Jonathan Nieder
Message 4 of 5 in “Fork or branch?”
  1. adam_kbApr 21, 2011
  2. Peter Jönsson PApr 21, 2011
  3. Jakub NarebskiApr 21, 2011
  4. Dmitry PotapovApr 21, 2011
  5. Jonathan NiederApr 21, 2011

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.