It works with GitExtensions, but not with Sublime Merge Build 1204.
Support for core.worktree was in Build 1084.
My structure:
C:\ project \ A \ [Project files]
C:\ git \ A \ .git [Folder]
C:\ git \ A \ .gitignore [File]
Command line
C:\ git \ A \ git config core.worktree C:/project/A
C:\ git \ A \ git config core.excludesFile C:/git/A/.gitignore
After that the C:\ git \ A \ .git \ config file looks like that:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
worktree = C:/project/A
excludesFile = C:/git/A/.gitignore
Now I open Sublime Merge and see the changed/untracked files.
But, if I click on Stage I get following error:
fatal: not a git repository: ‘/C/git/A/.git’
In the Console I got 2 lines:
Executing: “C:\Users\blabla\Downloads\sublime_merge_build_1204_x64\Git\cmd\git.exe” “add” “–” “Hello World.txt”
Working dir: C:\project\A
Maybe the reason is: /C/
Why is it not:
C:/git/A/.git
With Command line it works:
PS C:\git\A> git status
On branch master
No commits yet
Untracked files:
(use “git add …” to include in what will be committed)
Hello World.txt
nothing added to commit but untracked files present (use “git add” to track)
PS C:\git\A> git add “Hello World.txt”
PS C:\git\A> git commit -m “initial”
[master (root-commit) e2c7185] initial
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Hello World.txt
PS C:\git\A>
Here I added a new file and clicked stage: