Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 28 13:44
    lightbend-cla-validator commented #197
  • Oct 28 13:44
    liorregev opened #197
  • Oct 28 13:39
    liorregev opened #196
  • Oct 07 08:52
    raboof opened #195
  • Oct 07 08:32

    raboof on v1.0.2


  • Oct 07 08:27
    raboof commented #168
  • Oct 07 08:25

    raboof on master

    Fix invalid .git capture Fixes… Merge pull request #194 from ra… (compare)

  • Oct 07 08:25
    raboof closed #194
  • Oct 07 08:25
    raboof closed #193
  • Oct 06 07:15
    alejandrohdezma commented #193
  • Oct 06 07:15
    alejandrohdezma commented #194
  • Oct 05 13:33
    raboof unassigned #193
  • Oct 05 13:33
    raboof commented #193
  • Oct 05 13:32
    raboof opened #194
  • Oct 05 12:32
    raboof assigned #193
  • Oct 04 17:18
    alejandrohdezma opened #193
  • Sep 30 06:56
    fcv opened #192
  • Jul 27 21:05

    SethTisue on master

    drop sbt 0.13 from crossbuild … Merge pull request #191 from Se… (compare)

  • Jul 27 21:05
    SethTisue closed #191
  • Jul 27 21:05
    SethTisue closed #187
Philipp Hoffmann
oh wait, i might have just figured that what i said is not true :D
Igal Benardete
Is there a way to get the current branch and the base branch of a pull request using this plugin ?
Michael Rubin
I’m not able to get my sbt prompt to change with sbt-git (using sbt 1.1.2, sbt-git 1.0.0)
I’ve enabled GitVersioning and GitBranchPrompt
I’m returning Some(“foo”) from git.gitTagToVersionNumber
I expect my prompt to change, but it does not
Michael Rubin
Can anyone help with sbt/sbt-git#161 ?
Ivano Pagano
hello everyone, dumb question, what's the most common way to use the plugin to run git commands from within other build tasks?
I'm looking at the plugin impl, but I'm afraid to tie myself too much to the underlying implementation... but I can't still figure out if there's an "exposed" api to do that

Morning. I'm trying to use the versioning functionality but running into some problems. I just tagged my current branch, and see the following from git tag:


but when I run publishLocal, it's not picking up the tag. It's using a name of the form <sha>-SNAPSHOT instead.

So that appears to indicate that the plugin and versioning is working; but it's just not picking up the tag. Any ideas?
Ah just restarted SBT and it worked. Weird.
Ivano Pagano
about my previous question on running git commands I solved using Command.process("git ...", state) from a wrapping Command.command("myCmd") {...} definition, so I call sbt myCmd which in turn executes git from the sbt shell
I've enabled this plugin. I can now run git status from inside the shell when in sbt. However, I am confused as to how to use the versioning feature of this plugin. in my build.sbt i have a hardcoded value version := "1.1.5". I don't want this hardcoded value but rather want it generated from this plugin. Is this possible to do ?
Ivano Pagano
@bhaaratcrckt_twitter simply remove the version key definition from your build
it will be computed for you
you can check it in the sbt calling show version
Jakub Kozłowski
is there a quick way to get just the latest tag in sbt-git?
without any hashes, etc - just the latest existing tag
Ivano Pagano
there's a bunchful of useful vals in the exported object, let me check it for ya: https://github.com/sbt/sbt-git/blob/master/src/main/scala/com/typesafe/sbt/SbtGit.scala#L14
you'll find a gitCurrentTags which gives you a Seq of tags
in your sbt file you simply ask for git.gitCurrentTags as a SettingKey
@kubukoz :point_up:
keep in mind that any change to the git repo might need an sbt reload to update those values...
Jakub Kozłowski
nope, gitCurrentTags gives me an empty seq
basically the situation is like this:
  • I tagged a commit on master
  • I committed a few times to master after that
  • I'm trying to get the latest tag on master
current tags, the way I see it, gives me an empty list because the current commit isn't part of any tag
Ivano Pagano
you could use git describe within a custom sbt task that would have to invoke the corresponding sbt command, provided by the plugin... I did go that path for some things and it's not too pretty, but it should be feasible... the complicated piece with sbt is that you want to call a command (that needs a build state) from a task, which has none. There's a Task already to get the state, but I couldn't yet figure out how to read sbt's logged output for the describe command as something that the task can return as a value...
Hi , How do I fork an existing repo from my sbt ?
Naseem Mahasneh
Hi all ! Anyone know how to commit and push to git from sbt ?
Brian McKenna
our builds are failing at work because 0.8.5 for SBT 0.13
can not be found, did it get unpublished from Bintray?
0.8.5 seems to be missing, it did exist as of 4 days ago :/
Beck Gaël
I would like to know how to deal with cross api/language version using sbt.
For example i would like to be able to build one jar with scala-2.11/spark-2.3.3 and another with scala-2.12-spark-2.4.4 in a multi sub project environment.
Thank you
Beck Gaël
Any clues since :) ? Or maybe i expressed not enough clearly :(
Brian P. Holt
@beckgael something like this might work:
libraryDependencies ++= {
  CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((2, 12)) => Seq("organization" %% "artifact" % "version")
    case Some((2, 11)) => Seq("organization" %% "artifact" % "version")
    case _ => Nil
but this question might get more traction in the sbt/sbt room; this room is more meant for questions about the sbt-git plugin
Beck Gaël
Thank you @bpholt, my bad for expose my issue not one the more appropriate place, i should be more carreful next time...
Pritam Kadam
I am using ghpages plugin which internally uses sbt-git
We have configured github actions workflow to publish docs to ghpages on remote repo
how do you pass github token to sbt-git? does sbt-git reads token from some file or env variable?
Beck Gaël
This message was deleted
Justin Reeves
Am I using the plugin wrong?
Added it, started sbt succesully, git add ., git commit -m “added sb-git”, git push worked successfully
but then I want to git commit —amend after making some more changes and it hung, I wonder if it’s because it wants to open my $EDITOR and doesn’t know how
Justin Reeves
Also anyone know how to get the GitBranchPrompt plugin to work with PlayScala?
Jason Yeo
is this project still being maintained?
it looks abandoned. the last release was in 2018 :(
Zachary LeFevre

I need to access the git SHA from within my code. Ideally I'd be able to access the current sha from the buildInfo object generated by the sbt-buildinfo plugin.

I'm having a hard time.
I have .enablePlugins(sbtbuildinfo.BuildInfoPlugin, GitVersioning) on a common project, and addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") in my plugins.sbt file.

How do I now access git properties (specifically the git head sha) ?

Zachary LeFevre
I've found a solution.
In my build I do:
import com.typesafe.sbt.SbtGit.GitKeys.gitHeadCommit
    buildInfoKeys := Seq[BuildInfoKey] (name, version, scalaVersion, sbtVersion, "gitsha" -> {gitHeadCommit.value}),
Jason Yeo: not very actively, as you noticed, but I just did a release a few weeks ago
1 reply

I have a SBT project running on scala 2.11.12 and SBT 1.2.1 . I recently upgraded the SBT version to 1.3.1. Suddenly I started getting OOM error.

My SBT OPTS with SBT 1.2.1 are like this.


Now when I change the XX:MaxMetaspaceSize to 3072M, I suddenly see OOM vanishing.

Is it a reasonable workaround to use more Metaspace just for a newer SBT version ?