All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Fredrik Gustafsson <iveqy@iveqy.com>
Cc: git@vger.kernel.org
Subject: Re: how to reduce disk usage for large .git dirs?
Date: Fri, 14 Nov 2014 11:14:27 +0100	[thread overview]
Message-ID: <20141114101427.GA1548@aepfle.de> (raw)
In-Reply-To: <20141113160325.GA24351@paksenarrion.iveqy.com>

On Thu, Nov 13, Fredrik Gustafsson wrote:

> Thanks for sharing your notes! A few comments:
> 
> On Thu, Nov 13, 2014 at 04:44:57PM +0100, Olaf Hering wrote:
> > First clone the remote repository as usual. Then create a local branch for
> > each remote branch that is supposed to be worked on:
> > # git clone git://host/repo.git repo-master
> > # cd repo-master
> > # git checkout -b branchA origin/branchA
> > # git checkout -b branchB origin/branchB
> > # cd -
> >
> > Now clone each work branch into its own directory. The work dir references the
> > master repo. All changes come from and go into this repo, instead of the
> > remote repo.
> > # git clone -l -b branchA repo-master repo-branchA
> > # git clone -l -b branchB repo-master repo-branchB
> >
> > To make changs in a work dir, commit as usual. The changes will be pushed from
> > the work copy into the local master repo. Its required to have some other
> > branch than branchA active in repo-master, or push from work copy to
> > repo-master will fail.
> 
> That's one of the reason it's not recommended to push into a non-bare
> repository. You should clone your repo-master with the --bare option to
> avoid having a work dir there.

So my repo-master is now "bare". I pushed from repo-branchA into
repo-master and see my commits in both repos. But pushing from
repo-master to the remote fails because repo-master does not have
outstanding remote commits. However, git fetch doesnt do anything:

Fetching origin
From host:/remote/dir
* branch            HEAD       -> FETCH_HEAD


Obviously I miss something. The man page of git clone or fetch does not
mention how "bare" is supposed to be handled.

Olaf

  parent reply	other threads:[~2014-11-14 10:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 11:14 how to reduce disk usage for large .git dirs? Olaf Hering
2014-11-13 11:49 ` Fredrik Gustafsson
2014-11-13 12:03   ` Olaf Hering
2014-11-14 12:32     ` Jakub Narębski
2014-11-13 12:02 ` Roger Gammans
2014-11-13 12:21   ` Olaf Hering
2014-11-13 12:09 ` Duy Nguyen
2014-11-13 15:44 ` Olaf Hering
2014-11-13 16:03   ` Fredrik Gustafsson
2014-11-13 16:08     ` Johan Herland
2014-11-13 20:15       ` Jeff King
2014-11-14 10:14     ` Olaf Hering [this message]
2014-11-14 10:24       ` Fredrik Gustafsson
2014-11-14 10:30         ` Olaf Hering
2014-11-14 10:54           ` Olaf Hering
2014-11-14 11:24     ` Olaf Hering
2014-11-14 15:06       ` Andreas Schwab
2014-11-25 14:32         ` Olaf Hering

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=20141114101427.GA1548@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=git@vger.kernel.org \
    --cc=iveqy@iveqy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.