we are using grgit to update files in github.
def grgit = Grgit.open(dir: repoDir)
grgit.add(patterns: ['src'], update: false) // False should even add new files
grgit.commit(message: 'Updated subsets', amend: false)
Grgit is based on JGit, which does not currently have an equivalent to
git add -A.
You have to do this as two separate steps:
grgit.add(update: true) grgit.add(patterns: ['src'])