jj icon indicating copy to clipboard operation
jj copied to clipboard

FR: Add a `jj git colocate` command

Open PhilipMetzger opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

We've repeatedly had the request in the Discord for a command which eases the transition from a bare Git backed repo (initialized with jj git init), to a colocated (so moving the .git directory adjacent to .jj) one. This command should be responsible for doing that.

Implementation Steps

Add a new file under named colocate.rs under cli/src/commands/git/ (don't forget to add mod colocate to the mod.rs). Implement these steps with code: https://martinvonz.github.io/jj/latest/git-compatibility/#converting-a-repo-into-a-co-located-repo

PhilipMetzger avatar Oct 11 '24 17:10 PhilipMetzger

@PhilipMetzger how does this differ from jj git init --colocate?

estk avatar Oct 11 '24 18:10 estk

@PhilipMetzger how does this differ from jj git init --colocate?

IIUC, this takes a jj git backed repo presumably created by jj git init and turns it into a colocated repo.

It wasn't very clear from the initial description until I followed the link.

essiene avatar Oct 11 '24 18:10 essiene

@PhilipMetzger how does this differ from jj git init --colocate?

IIUC, this takes a jj git backed repo presumably created by jj git init and turns it into a colocated repo.

This is correct, I'll edit the description.

PhilipMetzger avatar Oct 11 '24 18:10 PhilipMetzger

This was completed by #7392 but GH didn't do its thing again.

PhilipMetzger avatar Nov 09 '25 22:11 PhilipMetzger