Installs git plugins and configures global gitignore
"features": {
"ghcr.io/duplocloud/devcontainers/git:1": {}
}| Options Id | Description | Type | Default Value |
|---|
Add this feature to your devcontainer configuration:
{
"features": {
"ghcr.io/duplocloud/devcontainers/git:1": {
"userName": "Your Name",
"userEmail": "you@example.com",
"signingKey": "github.pub"
}
}
}The feature respects these environment variables as fallbacks:
GIT_USER- Git user name (used ifuserNameoption is not set)GIT_EMAIL- Git email (used ifuserEmailoption is not set)
This feature installs custom git plugins:
Semantic version bumping for git tags:
# Bump patch version (1.0.0 -> 1.0.1)
git bump -v patch
# Bump minor version (1.0.0 -> 1.1.0)
git bump -v minor
# Bump major version (1.0.0 -> 2.0.0)
git bump -v major
# Bump and push
git bump -v patch -pExport CI environment variables for local testing:
# Export Bitbucket CI variables
eval $(git setenv bitbucket)
# Export GitLab CI variables
eval $(git setenv gitlab)When a signing key is configured, the feature sets up SSH-based commit signing:
# Commits will be automatically signed
git commit -m "This commit is signed"
# Verify signatures
git log --show-signatureWhen used with the onepassword-cli feature, SSH keys can be automatically fetched and configured. The git feature runs after onepassword-cli to ensure keys are available.
Example configuration:
{
"features": {
"ghcr.io/duplocloud/devcontainers/onepassword-cli:1": {
"autoSsh": true,
"sshSecretNames": "GitHub SSH Key"
},
"ghcr.io/duplocloud/devcontainers/git:1": {
"signingKey": "GitHub_SSH_Key.pub"
}
}
}Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.