@@ -27,27 +27,42 @@ Add the following to your `project/plugins.sbt` or `~/.sbt/0.13/plugins/plugins.
27
27
28
28
additionally, use one of the older README.md files: (https://github.com/sbt/sbt-git/blob/v0.7.1/README.md )
29
29
30
- ### Using JGit ###
30
+ ### JGit ###
31
31
32
- If you do not have git installed and available on your path (e.g. you use windows),
33
- make sure your ` git.sbt ` or ` ~/.sbt/0.13/git.sbt ` file looks like this:
32
+ JGit is a Java interface to git that allows some git operations to be
33
+ performed in the JVM without invoking an external git executable. By default,
34
+ this plugin uses JGit for read-only operations such as inspecting HEAD; for
35
+ write operations, it assumes a git executable is present and on the PATH and
36
+ it uses that.
37
+
38
+ In certain circumstances you may want to force the use of JGit or an
39
+ executable for both read-only and read-write operations; for example, if no
40
+ git executable is present (e.g. you use windows and you haven't installed git
41
+ or it's not on your PATH) you need to disable the console interface, or if
42
+ you rely on a git feature that JGit does not support (e.g. worktrees) you need
43
+ to disable the JGit interface.
44
+
45
+ The following settings will force the use of only JGit or a git executable,
46
+ respectively:
47
+
48
+ * ` useJGit `
49
+ * ` useReadableConsoleGit `
50
+
51
+ These settings can be included in your project's ` git.sbt ` or in
52
+ ` ~/.sbt/1.0/git.sbt ` -- for example, if no git executable is installed,
53
+ either file can have the following contents:
34
54
35
55
useJGit
36
56
37
- Or you can type this into the prompt:
57
+ Or you can ` set ` the appropriate setting in the sbt prompt:
38
58
39
- > set useJGit
59
+ > set useReadableConsoleGit
40
60
[info] Reapplying settings...
41
61
[info] Set current project to scala-arm (in build file:...)
42
62
> session save
43
63
[info] Reapplying settings...
44
64
[info] Set current project to scala-arm (in build file:...)
45
65
46
- This will enable a java-only GIT solution that, while not supporting all the same
47
- commands that can be run in the standard git command line, is good enough for most
48
- git activities.
49
-
50
-
51
66
## Versioning with Git ##
52
67
53
68
You can begin to use git to control your project versions.
0 commit comments