git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lars Hjemli" <lh@elementstorage.no>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Avery Pennarun" <apenwarr@gmail.com>,
	"skillzero@gmail.com" <skillzero@gmail.com>,
	git@vger.kernel.org
Subject: Re: Why do git submodules require manual checkouts and commits?
Date: Fri, 16 May 2008 16:58:44 +0200	[thread overview]
Message-ID: <8c5c35580805160758n3b43c282i48009867b52106bf@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0805161521510.30431@racer>

On Fri, May 16, 2008 at 4:24 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>  On Fri, 16 May 2008, Avery Pennarun wrote:
>
>
> > Think of it this way: I can commit, or not commit, my dirty Makefile at
>  > the same time as everything else (in a single project) with a single
>  > "git commit" line, depending on what I want to do.  Things like "git
>  > commit -a" and "git add -u" speed up the common case where I just want
>  > to commit everything.  But with submodules, that common case looks more
>  > like this:
>  >
>  >    cd sub
>  >    git checkout -b manual_branchname_because_there_was_no_default
>  >    git commit -a
>  >    git push etc.
>  >    cd ..
>  >    git commit -a
>  >    git push etc.
>
>  Funny, for me it looks completely different:
>
>  $ cd sub
>  # work, work, work
>  # from time to time commit
>  # from time to time rebase -i to clean up some things
>  # test, test, test
>  # sometimes push
>
>  And then, every once in a while, it is
>
>  $ cd ..
>  $ git add submodule
>  $ git commit -s submodule
>  $ git push

Just to add to the picture, for me it's

$ (cd submodule && git checkout tag)
$ git add submodule
$ git commit -s -m "Use submodule-tag"

If I want to work in/with the submodule, I usually do that by "cd
../submodule", i.e. I've got another clone of the submodule
repository.

--
lh

  parent reply	other threads:[~2008-05-16 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16  4:16 Why do git submodules require manual checkouts and commits? skillzero
2008-05-16 10:17 ` Johannes Schindelin
2008-05-16 13:43 ` Avery Pennarun
2008-05-16 13:58   ` Johannes Schindelin
2008-05-16 14:12     ` Avery Pennarun
2008-05-16 14:24       ` Johannes Schindelin
2008-05-16 14:44         ` Avery Pennarun
2008-05-16 14:58         ` Lars Hjemli [this message]
2008-05-19  4:38   ` skillzero

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=8c5c35580805160758n3b43c282i48009867b52106bf@mail.gmail.com \
    --to=lh@elementstorage.no \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=skillzero@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).