Re: move git repository out of a folder?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 4, 2008, 20:07 UTC
- Message-ID
- <20080604200724.GV12896@spearce.org>
- In-Reply-To
- <1086fb5f0806041303v7856404dxb95b5a450ac30ae1@mail.gmail.com>
Sean Brown <seanmichaelbrown@gmail.com> wrote:
Show 22 quoted lines
> Let's say I've got this directory structure of source files: > > /folderA > /folderA/sourcecode/ > /folderA/sourcecode/file1.txt > /folderA/sourcecode/file2.txt > etc... > > When putting the project under git source control, I did this: > > cd /folderA > git init > > 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?
git mv sourcecode/* . rmdir sourcecode git commit
-- Shawn.