HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

jj git clone — Create a new repo backed by a clone of a Git repo. Note: Unless `--colocate` is used, it is not a va

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createcommandnewjj git clonecliclonerepobacked

Problem

How to use the jj git clone command: Create a new repo backed by a clone of a Git repo. Note: Unless --colocate is used, it is not a valid Git repository and git commands can't be used on it. More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-git-clone>.

Solution

jj git clone — Create a new repo backed by a clone of a Git repo. Note: Unless --colocate is used, it is not a valid Git repository and git commands can't be used on it. More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-git-clone>.

Create a new repo backed by a clone of a Git repo into a new directory (the default directory is the repository name):
jj git clone {{source}} {{path/to/directory}}


Create a clone and use the given name for newly created remote:
jj git clone --remote {{remote_name}} {{source}}


Clone a Git repo, only fetching the 10 most recent commits:
jj git clone --depth {{10}} {{source}}


Clone colocating the Jujutsu repo with the Git repo (allowing the use of both jj and git commands in the same directory):
jj git clone --colocate {{source}}

Code Snippets

Create a new repo backed by a clone of a Git repo into a new directory (the default directory is the repository name)

jj git clone {{source}} {{path/to/directory}}

Create a clone and use the given name for newly created remote

jj git clone --remote {{remote_name}} {{source}}

Clone a Git repo, only fetching the 10 most recent commits

jj git clone --depth {{10}} {{source}}

Clone colocating the Jujutsu repo with the Git repo (allowing the use of both `jj` and `git` commands in the same directory)

jj git clone --colocate {{source}}

Context

tldr-pages: common/jj git clone

Revisions (0)

No revisions yet.