git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Avery Pennarun" <apenwarr@gmail.com>
To: seanmichaelbrown@gmail.com
Cc: git@vger.kernel.org
Subject: Re: move git repository out of a folder?
Date: Wed, 4 Jun 2008 16:08:57 -0400	[thread overview]
Message-ID: <32541b130806041308y43a18b50s5dbca61f96a52823@mail.gmail.com> (raw)
In-Reply-To: <1086fb5f0806041303v7856404dxb95b5a450ac30ae1@mail.gmail.com>

On 6/4/08, Sean Brown <seanmichaelbrown@gmail.com> wrote:
>  So now when colleagues clone my repository, they get the source code
>  in the "sourcecode" folder.  I'd like to just make the repository
>  simply give them the source files, not in a directory.  In other
>  words, as if I had originally been smart and done this:
>
>  cd /folderA/sourcecode
>  git init
>
>  Can I make that happen without losing all of the history?

You could just make a commit which renames all the files into the
parent folder.  This is relatively harmless and correctly reflects
what really happened.

You might also want to look at git-filter-branch and its
"--subdirectory-filter" option.

Have fun,

Avery

      parent reply	other threads:[~2008-06-04 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04 20:03 move git repository out of a folder? Sean Brown
2008-06-04 20:07 ` Shawn O. Pearce
2008-06-04 20:14   ` Jakub Narebski
2008-06-04 20:18     ` Sean Brown
2008-06-04 20:08 ` Avery Pennarun [this message]

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

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

  git send-email \
    --in-reply-to=32541b130806041308y43a18b50s5dbca61f96a52823@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=seanmichaelbrown@gmail.com \
    /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.
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).