Skip to content

Commit

Permalink
docs: list supported and unsupported Git features
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonz committed Mar 10, 2022
1 parent b64ee14 commit a45b6ac
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docs/git-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,52 @@ See `jj help git` for help about the `jj git` family of commands, and e.g.
briefer help).


## Supported features

The following list describes which Git features Jujutsu is compatible with. For
a comparison with Git, including how workflows are different, see the
[Git-comparison doc](git-comparison.md).

* Configuration: No, the only configuration from Git (e.g. in `~/.gitconfig`)
that's respected is the configuration of remotes. Feel free to file a bug
if you miss any particular configuration options.
* Authentication: Partial. Only `ssh-agent` or a password-less key file at
`~/.ssh/id_rsa` (and only at exactly that path).
* Branches: Yes. You can read more about
[how branches work in Jujutsu](branches.md)
and [how they interoperate with Git](#branches).
* Tags: Partial. You can check out tagged commits by name (pointed to be either
annotated or lightweight tags), but you cannot create new tags.
* .gitignore: Partial. No support for ignores in `.git/info/exclude`
([#65](https://github.com/martinvonz/jj/issues/65)) or via `core.excludesfile`
config ([#87](https://github.com/martinvonz/jj/issues/87)). Also, it uses a
native implementation, so please report a bug if you notice any difference
compared to `git`.
* .gitattributes: No. There's [#53](https://github.com/martinvonz/jj/issues/53)
about adding support for at least the `eol` attribute.
* Merge commits: Yes, including octopus merges (i.e. with more than 2 parents).
* Detached HEAD: Yes. Jujutsu supports anonymous branches, so this is a natural
state.
* Orphan branch: Yes. Jujutsu has a virtual root commit that appears as parent
of all commits Git would call "root commits".
* Staging area. Kind of. The staging area will be ignored. For example,
`jj diff` will show a diff from the Git HEAD to the working copy.
* Garbage collection: Yes. It should be safe to run `git gc` in the Git repo,
but it's not tested, so it's probably a good idea to make a backup of the
whole workspace first. There's [no garbage collection and repacking of
Jujutsu's own data structures yet](https://github.com/martinvonz/jj/issues/12),
however.
* Submodules: No. They will not show up in the working copy, but they will not
be lost either.
* Partial clones: No. We use the [libgit2](https://libgit2.org/) library, which
doesn't have support for partial clones.
* git-worktree: No, but there's native support for multiple working copies
backed by a single repo. See the `jj workspace` family of commands.
* Sparse checkouts: No, but there is
[#52](https://github.com/martinvonz/jj/issues/52) about native support for
sparse checkouts.
* Signed commits: No ([#58](https://github.com/martinvonz/jj/issues/58)).

## Creating an empty repo
To create an empty repo using the Git backend, use `jj init --git <name>`. Since
the command creates a Jujutsu repo, it will have a `.jj/` directory. The
Expand Down

0 comments on commit a45b6ac

Please sign in to comment.