On 05/04/18 11:34 PM, Bryan Turner wrote:
On Thu, Apr 5, 2018 at 4:18 PM, Bryan Turner <bturner@xxxxxxxxxxxxx> wrote:
So passing --work-tree tells Git where to store your _files_, but it's
still using the same .git directory.
If your goal is to have worktrees for various versions, that implies
the git worktree [1] command might be more along the lines of what
you're looking for. An invocation based on above might look like this:
$ git -C linux-stable/ worktree add $PWD/tmp/ checkout linux-4.15.y
Apologies, I didn't mean to have the "checkout" in that.
$ git -C linux-stable/ worktree add $PWD/tmp/ linux-4.15.y
That should leave linux-4.16.y checked out in linux-stable, while
creating a full work tree in $PWD/tmp that has 4.15.y checked out.
Note that worktree is a newer git command. 2.17 has it, but old
versions like 2.1 won't.
[1] https://git-scm.com/docs/git-worktree
Hope this helps!
For sure, it helps! Thanks.
- Thierry