git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Kerry, Richard" <richard.kerry@atos.net>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Move some files, with all history, from one project into a new one
Date: Wed, 15 Apr 2020 08:31:35 +0000	[thread overview]
Message-ID: <AM0PR02MB3715F9566BD9FEFAF832F0749CDB0@AM0PR02MB3715.eurprd02.prod.outlook.com> (raw)

I would like to move some files, from the project in which they have always resided into  a new project.  I would like to keep all their history.
I don't want to waste space by also moving the rest of the old project's history, or historical file contents.

We have a long-standing project, main-system.  A group of files within it are designated as demo-system (sometimes whole folders, sometimes files within folders with other files).
All development is done on the master branch.
It has now transpired that the demo-system files are necessary, but no longer want to be within main-system but in a new project of their own.  So I would like to move them from the main-system repo into a new repo of their own.  I do want all their history but I don't want to take any contents from other files from main-system, which is quite big.
Please can someone advise if there is a particular method I should best use for this.
Do I create a new branch, then delete the rest of main-system leaving only what I want?  Surely if I do that then I would end up with all the main-system file data within the new repo, which would expand its size.
Is there a recommended way to extract certain files with their histories?

Regards,
Richard.


             reply	other threads:[~2020-04-15  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  8:31 Kerry, Richard [this message]
2020-04-15 15:11 ` Move some files, with all history, from one project into a new one Jeff King
2020-04-15 15:49   ` Taylor Blau
2020-04-16  6:05     ` Elijah Newren
2020-04-17 13:48       ` Kerry, Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR02MB3715F9566BD9FEFAF832F0749CDB0@AM0PR02MB3715.eurprd02.prod.outlook.com \
    --to=richard.kerry@atos.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).