RE: Is there any plan to support partial checkout or submoudule improvement?
- From
- franky <yinping@kooxoo.com>
- Date
- Oct 16, 2007, 09:56 UTC
- Message-ID
- <20071016095622.CE14F7E6F@mail.kooxoo.com>
- In-Reply-To
- <8c5c35580710160142x1f699208gfc226072a27e997a@mail.gmail.com>
Show 8 quoted lines
> Well, there is always > > $ git archive --remote=<repo> <revspec> <path> | tar -x > > This is effectively a partial checkout of an arbitrary revision from a > remote repo. > > --
That's actually "a single command", but a little complex. And there still are some problems with this single command
1. each time is full checkout (not incremental), so bad performance for large bin directory 2. I can't know deployment version easily and I can't use "git-log" to see the log and to decide which version to back to when necessary.
I just find an ugly resolution:
1. git-clone host:project.git project
Cloned project is as follows (src, bin are subdir instead of submodule)
project
src
bin
.git2. cd project && rm -rf src 3. when project.git changed, then git-fetch && git-checkout origin/master bin
Unfortulately, it's annoying when I run git-status which complains "deleted: src ". And "git-log" will not show the newest log since git-checkout doesn't update the index file
So, the alternative for the 3rd step is git-pull && rm src
It's so ugly!
Suggestion 1: how about adding a paths option for git-status just like git-diff and git-log Suggestion 2: how about changes the default paths for "git-diff", "git-log" and so on from the "top dir with .git" to "the current dir"? So when I'm in bin directory and run "git-log", it will only report log or diff in bin directory. franky