git-workflow-and-versioning
Skill2 starsChanged 40 days agoMITView on GitHub
Use when managing branches, commits, versioning, and release workflows for Android projects, or when cutting a release, choosing a version bump, tagging, or writing a changelog. Covers trunk-based development, atomic commits, versionCode/versionName derived from tags, semver for library modules, changelogs and Play release notes, and signing configurations.
- Commits and pushes
61 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- TheAstroByte/astrobyte-agent-skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- steven123397/nexuskit-skillstheir own version, first seen Nov 1, 2026
- oleg494/coding-kittheir own version, first seen Nov 1, 2026
- yuusakuri/agent-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use marketing-ideas, minimalist-ui and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
silvainfmSkillmarketing-ideas
When the user needs marketing ideas, inspiration, or strategies for their SaaS or software product. Also use when the user asks for 'marketing ideas,' 'growth ideas,' 'how to market,' 'marketing strategies,' 'marketing tactics,' 'ways to promote,' or 'ideas to grow.' This skill provides 140 proven marketing approaches organized by category.
Also in 4 projects that use this
AnasX7Skillminimalist-ui
Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
Also in 4 projects that use this
GoogleSkillponytail
Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).
Also in 5 projects that use this
AnasX7Skillindustrial-brutalist-ui
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Also in 3 projects that use this
OpenAISkillimage-to-code
Implement a selected image, screenshot, mockup, or Image Gen reference as a faithful, responsive frontend.
Also in 3 projects that use this
Other versions61 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 61
- addyosmani/agent-skills★ 114ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- shashankswe2020-ux/whoop-mcp★ 174same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- jmxt3/gitscape.ai★ 33same name
- sampleXbro/agentsmesh★ 27same name
- jaskirat1616/grok-skills★ 22same name
- ishandutta2007/Awesome-Agent-Skills★ 21same name
- JPeetz/agent-skills★ 14same name
- HK-hub/AgentSkills★ 6same name
51 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-accessibilitySkill
- android-architectureSkill
- android-background-workSkill
- android-data-persistenceSkill
- android-device-testingSkill
- android-e2e-verificationSkill
- android-ui-engineeringSkill
- api-and-interface-designSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- observability-and-instrumentationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 1 is common, 4 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 57 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 46
Delete branches after merge
- Distinctive: line 47
No long-lived feature branches — use feature flags instead
- Distinctive: line 246
Use Google Play App Signing for production (Google manages the upload key)
- Distinctive: line 294
Commit messages that only say "fix" or "update"
- Distinctive: line 297
No CI check on main branch
“Common” is measured: kept by at least 6 in 10 of the 57 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Workflow and Versioning
Overview
Trunk-based development: keep main always deployable, use short-lived feature branches (1–3 days), and make atomic commits that address one logical concern. Android versioning requires managing versionCode (monotonic integer for Play Store) and versionName (human-readable semver).
When to Use
- Starting a new feature branch
- Making commits during development
- Preparing a release
- Managing version numbers, tagging a release, or writing a changelog / Play "What's new"
- Publishing a library module (AAR/Maven) that other code depends on
- Reviewing branch strategy or merge approach
- Setting up signing configurations
Skip when: The project has an established, documented git workflow.
Core Process
Step 1: Trunk-Based Development
- Branch strategy:
main (always deployable)
├── feature/task-sharing (1-3 days, then merge)
├── feature/dark-mode (1-3 days, then merge)
├── fix/crash-on-empty-list (hours, then merge)
└── release/1.2.0 (cut from main, hotfixes only)- Branch rules:
mainis always green (CI passes)- Feature branches are short-lived (1–3 days max)
- Delete branches after merge
- No long-lived feature branches — use feature flags instead
- Release branches are cut from
main, not from feature branches
Step 2: Atomic Commits
- Each commit addresses one logical concern:
# GOOD: atomic commits
git commit -m "$(cat <<'EOF'
Add TaskDao with CRUD operations
Room DAO for tasks table with observe, upsert, and delete operations.
Flow-based observation for reactive UI updates.
EOF
)"
git commit -m "$(cat <<'EOF'
Add TaskRepository with offline-first sync
Implements TaskRepository interface. Local Room database is the source
of truth. Remote sync via Retrofit with error handling for network
failures.
EOF
)"
# BAD: kitchen sink commit
git commit -m "Add task feature with database, API, UI, and tests"- Commit message format:
- First line: imperative, under 72 characters ("Add", "Fix", "Update", "Remove")
- Blank line
- Body: explain why, not what (the diff shows what)
- Reference issue numbers:
Fixes #42
Step 3: Change Sizing
- Target ~100 lines per commit:
| Size | Lines | Review Time | Action |
| Small | < 50 | Minutes | Merge quickly |
| Medium | 50–200 | ~30 min | Standard review |
| Large | 200–500 | Hours | Consider splitting |
| Too Large | > 500 | Days | Must split |
- Split strategies:
- Refactoring separate from feature work
- Data layer separate from UI layer
- Tests in the same commit as the code they test (not separate)
Step 4: Save-Point Pattern
- Commits as checkpoints:
# Before risky changes:
./gradlew test && git add -A && git commit -m "Checkpoint: working state before refactor"
# Try the change...
# If it breaks:
git revert HEAD # Undo cleanly
# If it works:
# Continue to next incrementStep 5: Android Versioning
- Version management in
build.gradle.kts:
android {
defaultConfig {
// versionCode: monotonically increasing integer
// Play Store requires each upload to have a higher versionCode
versionCode = 12
// versionName: human-readable semantic version
versionName = "1.2.0"
}
}- Versioning strategy:
versionName: MAJOR.MINOR.PATCH (semantic versioning)
MAJOR: breaking changes, major redesign
MINOR: new features, backward compatible
PATCH: bug fixes, no new features
versionCode: monotonically increasing integer
Strategy 1: Simple increment (1, 2, 3, ...)
Strategy 2: Derived from version (10200 for 1.2.0 = major*10000 + minor*100 + patch)
Strategy 3: Build number from CI (autoincrement)For an app, MAJOR is a product call (redesign, dropped minSdk); semver is a strict contract only for published library modules (Step 6). Whatever the strategy, versionCode must exceed every value ever uploaded — when switching strategies, offset the new scheme above the last upload.
- Derive versions from the release tag, don't hand-edit them. CI passes them as Gradle properties; local builds get safe defaults:
// app/build.gradle.kts
val appVersionName = providers.gradleProperty("versionName").getOrElse("0.0.0-dev")
val appVersionCode = providers.gradleProperty("versionCode").map(String::toInt).getOrElse(1)
android {
defaultConfig {
versionCode = appVersionCode
versionName = appVersionName
}
}# CI job triggered by pushing tag v1.4.0
VERSION_NAME="${GITHUB_REF_NAME#v}" # "1.4.0"
IFS=. read -r MAJOR MINOR PATCH <<< "$VERSION_NAME"
VERSION_CODE=$((MAJOR * 10000 + MINOR * 100 + PATCH)) # 10400 (Strategy 1 above)
./gradlew bundleRelease -PversionName="$VERSION_NAME" -PversionCode="$VERSION_CODE"The tag, the artifact, and the changelog can then never disagree, and two branches can't both hand-bump to the same versionCode.
Step 6: Release & Versioning
- Tag every release — an immutable, reproducible point in history, on the exact commit that was built:
git tag -a v1.4.0 -m "Release 1.4.0"
git push origin v1.4.0
# Hotfix: fix on main, cherry-pick to release/1.4, tag v1.4.1 there- Keep a human changelog.
CHANGELOG.mdin Keep a Changelog style: newest on top, grouped byAdded / Changed / Fixed / Deprecated / Removed / Security, phrased around user impact — not dumped commit messages. Write the entry in the same PR as the change, not reconstructed at release time.
## [1.4.0] - 2026-06-12
### Added
- Share a task list via link
### Fixed
- Recurring tasks drifting by an hour after a timezone change- Play Store "What's new" per locale — a short, user-facing summary per release (Play Console limits it to 500 characters per language). Keep the text in the repo so it's reviewed in the PR; the path depends on your upload tool (e.g.
distribution/whatsnew/whatsnew-en-USfor ther0adkll/upload-google-playGitHub Action,src/main/play/release-notes/en-US/default.txtfor Gradle Play Publisher). Automating the upload isci-cd-and-automation; rollout isshipping-and-launch. - Published library modules (AAR/Maven) follow strict semver: removing or changing a public signature — or behaviour consumers rely on (Hyrum's Law, see
api-and-interface-design) — is MAJOR; additive API is MINOR; fixes are PATCH. Deprecate in a minor, remove in the next major (seedeprecation-and-migration). Catch accidental breaks with the Kotlin binary-compatibility-validator plugin:
// library/build.gradle.kts
plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "<latest>"
}./gradlew apiDump # writes api/<module>.api — commit it
./gradlew apiCheck # runs as part of ./gradlew check; fails if the public API drifted from the dumpThe .api diff is the review signal: removals or changed signatures mean MAJOR, additions only mean MINOR.
Step 7: Signing Configuration
- Release signing setup:
// build.gradle.kts
android {
signingConfigs {
create("release") {
storeFile = file(properties["KEYSTORE_PATH"] as String)
storePassword = properties["KEYSTORE_PASSWORD"] as String
keyAlias = properties["KEY_ALIAS"] as String
keyPassword = properties["KEY_PASSWORD"] as String
}
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("release")
}
}
}# local.properties (NEVER committed)
KEYSTORE_PATH=../release.keystore
KEYSTORE_PASSWORD=secure_password
KEY_ALIAS=release
KEY_PASSWORD=secure_password- Signing rules:
- Keystore file NEVER in git (store securely, backup separately)
- Signing credentials in
local.propertiesor CI secrets - Use Google Play App Signing for production (Google manages the upload key)
- Debug keystore is auto-generated (don't commit it)
Step 8: Pre-Commit Checks
- Before committing:
# Verify staged changes compile and pass tests
./gradlew test && ./gradlew assembleDebug
# Check for secrets
grep -rn "password\|secret\|api_key\|token" --include="*.kt" --include="*.properties" | grep -v "local.properties" | grep -v "test"Step 9: Git Worktrees for Parallel Work
- Use worktrees when working on multiple features:
# Create a worktree for a parallel task
git worktree add ../project-feature-b feature/dark-mode
# Work in the worktree independently
cd ../project-feature-b
# ... make changes, commit ...
# Clean up when done
git worktree remove ../project-feature-bCommon Rationalizations
| Shortcut | Why It Fails |
| "I'll squash it all at the end" | Squashed commits lose context. Atomic commits are reviewable and revertable. |
| "The feature branch will only take a week" | Week-long branches drift from main and create merge conflicts. Use feature flags. |
| "versionCode doesn't matter" | Play Store rejects uploads with non-increasing versionCode. Plan the strategy early. |
| "I'll fix the commit message later" | Rewriting history after push is destructive. Write good messages the first time. |
| "I'll just bump versionName in build.gradle.kts" | Hand edits drift from the tag, and parallel branches collide on the same versionCode. Derive both from the tag/CI. |
| "It's a small library change, bump the patch" | Diff size is irrelevant; consumers' code is. If apiCheck shows a removed or changed signature, it's a major. |
| "The changelog is just the commit log" | Commits are for developers; the changelog and "What's new" are for users, curated by impact. |
| "We'll write the changelog at release time" | By then the impact is reconstructed from memory and half is missing. Write the entry with the change. |
Red Flags
- Long-lived feature branches (> 3 days)
- Kitchen-sink commits (> 500 lines, multiple concerns)
- Commit messages that only say "fix" or "update"
- Keystore or signing credentials in git
- versionCode not monotonically increasing
- No CI check on
mainbranch - Force-push to
main versionName/versionCodehand-edited in build files, out of sync with the release tag- A release build with no tag, or a tag not on the commit that was built
- A library module's public API changed with no
.apidump diff in the PR, orapiCheckdisabled - A breaking library change shipped under a minor or patch bump
- A release with no
CHANGELOG.mdentry, or placeholder "What's new" text
Verification
- Feature branches are short-lived (1–3 days)
- Commits are atomic (one logical concern each)
- Commit messages explain why, not what
- versionCode increases with every release
- Signing credentials not in git
mainbranch always passes CI- Pre-commit:
./gradlew test && ./gradlew assembleDebugpasses
For every release:
- Release commit tagged (
git tag -a vX.Y.Z) and the tag pushed;versionName/versionCodecame from the tag/CI, not a hand edit CHANGELOG.mdhas a curated entry for this version, grouped by impact- Play "What's new" text exists for every shipped locale, within the 500-character limit
- Library modules:
./gradlew apiCheckpasses; the bump matches the.apidiff (removal/change → major, addition → minor, none → patch)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

