libgit2 / libgit2/libgit2sharp

Repository.Init() vs git init --separate-git-dir

Open
#1,810 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

C:\working> git init --separate-git-dir='C:\repository'

creates C:\repository directory that contains directly git files (HEAD, config, index, refs)

Repository.Init("C:\working". "C:\repository")

creates C:\repository directory that contains .git directory

How to make Repository.Init() do the same as git init --separate-git-dir? (without the extra .git directory)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing Repository.Init("C:\working", "C:\repository") with git init --separate-git-dir='C:\repository'. Trace the Repository.Init entry point and its handling of the second path. Done means the target directory contains Git files directly rather than an extra .git directory; add or run the relevant initialization test if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.