[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: project.el: git submodules?

From: Michael Welsh Duggan
Subject: Re: project.el: git submodules?
Date: Tue, 12 May 2020 16:45:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> FWIW, the examples of git worktrees on my machine all include a ".git/"
>> directory.  It's just that some of its contents are symbolic links.
> Hmm... are you sure these are Git worktrees?
> Maybe they're "poor man's git-worktrees" created by the old
> `git-new-workdir` hack which has been made obsolete by the "new" `git
> worktree` feature.

Pretty sure.

    /tmp/$ git --version
    /tmp$ mkdir git-test
    /tmp$ cd git-test
    /tmp/git-test$ mkdir repo
    /tmp/git-test$ cd repo
    /tmp/git-test/repo$ git init
    Initialized empty Git repository in /tmp/git-test/repo/.git/
    /tmp/git-test/repo$ echo "Test file" > repo
    /tmp/git-test/repo$ git add repo
    /tmp/git-test/repo$ git commit -m "Initial commit."
    [master (root-commit) 544fba2] Initial commit.
     1 file changed, 1 insertion(+)
     create mode 100644 repo
    /tmp/git-test/repo$ git worktree add ../worktree
    Preparing worktree (new branch 'worktree')
    HEAD is now at 544fba2 Initial commit.
    /tmp/git-test/repo$ cd ../worktree/
    /tmp/git-test/worktree$ ls -la .git
    -rw-r--r-- 1 md5i md5i 51 May 12 16:42 .git
    /tmp/git-test/worktree$ cat .git
    gitdir: /tmp/git-test/repo/.git/worktrees/worktree

Michael Welsh Duggan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]