diff --git a/docs/git-compatibility.md b/docs/git-compatibility.md index 1402e840e..ec33c1857 100644 --- a/docs/git-compatibility.md +++ b/docs/git-compatibility.md @@ -174,15 +174,16 @@ technically possible (though not officially supported) to convert it into a co-located repo like so: ```bash +# Ignore the .jj directory in Git +echo '/*' > .jj/.gitignore # Move the Git repo mv .jj/repo/store/git .git # Tell jj where to find it echo -n '../../../.git' > .jj/repo/store/git_target -# Ignore the .jj directory in Git -echo '/*' > .jj/.gitignore # Make the Git repository non-bare and set HEAD git config --unset core.bare -jj new @- +# Convince jj to update .git/HEAD to point to the working-copy commit's parent +jj new && jj undo ``` We may officially support this in the future. If you try this, we would