Workflow

Git for 2D character projects: the working setup

13 min read

Git for 2D character projects: the working setup

It's 2 AM. Your hero’s left arm pops out of socket on every other run-cycle frame, and your demo is in nine hours. You pull the latest changes, and Git screams about binary conflicts on a dozen layered PNGs. Your heart sinks. This isn't just a bad night; it's the pain of managing 2D character projects without a proper version control setup. You've hit the wall where code-centric Git meets pixel-perfect art, and it's not pretty. This scenario is all too common for solo or small-team game developers trying to use Git for their 2D character animation assets.

1.Git was built for code, not your character's intricate layered PNGs

Standard Git excels at tracking changes in text files. It sees lines added, lines removed, and can intelligently merge divergent histories. This is perfect for `.cs` or `.gd` scripts. But your hero's 30-layer Aseprite file or that detailed texture atlas? Git sees them as opaque blobs. A single pixel change means an entirely new file to Git, making diffs useless and merges impossible. This fundamental mismatch is the root of most Git headaches in 2D game development.

Illustration for "Git was built for code, not your character's intricate layered PNGs"
Git was built for code, not your character's intricate layered PNGs

Imagine trying to merge two versions of a `.png` file where one artist nudged an arm and another recolored a shoe. Git can't understand those granular changes; it just sees two completely different binary files. This leads to frustrating manual resolutions and the constant fear of overwriting someone else's work. It’s a time sink that pulls you away from actual game development, leaving you to wrestle with version control instead of animating. You need a better way to handle these large, non-text assets.

a.The silent killer: repository bloat and slow operations

Every time you commit a large binary file, Git stores a complete copy of it in your repository's history. Over time, this makes your repo enormous. Cloning takes ages, pushing and pulling become agonizingly slow, and your local disk space vanishes. A repository that should be a few hundred megabytes can quickly balloon into gigabytes with just a few character iterations. This bloat directly impacts your team's efficiency and development speed.

  • Cloning a fresh copy of the repo takes excessive time.
  • Pushing new art assets feels like uploading the entire internet.
  • Checking out old versions becomes a punishing wait.
  • Running `git gc` might help, but it's a temporary fix for a systemic issue.
  • Disk space usage skyrockets on every developer's machine.
For 2D character projects, Git LFS isn't an optional upgrade; it's the fundamental layer you should build on, especially when working with layered PNGs or Aseprite files.

2.Git LFS is your non-negotiable ally for managing character assets

Enter Git LFS (Large File Storage). This extension changes how Git handles large files by storing them outside the main Git repository. Instead of the actual file, Git stores a small pointer in your repo, which references the large file stored on a separate LFS server. When you check out a branch, LFS downloads the specific version of the large files needed. This keeps your Git repository lean and fast, while still providing version control for your art.

Illustration for "Git LFS is your non-negotiable ally for managing character assets"
Git LFS is your non-negotiable ally for managing character assets

LFS is a game-changer for any project involving significant art assets, like detailed 2D characters with multiple animation frames or layered source files. It ensures that your Git history remains compact and performant, allowing for rapid cloning and branching operations. Without it, you're fighting an uphill battle against Git's inherent design limitations for binary data. It’s the essential tool for collaborative 2D game development.

a.Setting up Git LFS correctly from day one

  1. 1Install Git LFS: Download and install it from the official GitHub page. Run `git lfs install` once per system.
  2. 2Track your file types: Use `git lfs track "*.psd"` or `git lfs track "*.png"` to tell Git which file extensions to manage with LFS. Be specific and inclusive of all large binary assets.
  3. 3Commit `.gitattributes`: This file, generated by `git lfs track`, tells Git which files are managed by LFS. Commit it immediately to your repository so everyone uses the same configuration.
  4. 4Push existing large files: If you have existing large files already committed to Git, you might need to migrate them to LFS using `git lfs migrate import --everything` (use with caution, as it rewrites history).
  5. 5Verify LFS tracking: Always check `git lfs status` to ensure your files are being tracked as expected before pushing. This prevents accidental large file commits.

Quick rule:

Always run `git lfs track` for any file type that is large, binary, and frequently changes. This includes `.psd`, `.kra`, `.aseprite`, `.png`, `.jpg`, `.tga`, and even `.bvh` files if they're particularly large. When in doubt, track it with LFS.

3.Crafting a .gitignore that saves your sanity and keeps your repo clean

A well-configured `.gitignore` file is just as crucial as LFS. It prevents temporary files, build artifacts, and local settings from polluting your repository. These files are often generated by your art tools or game engine and have no place in version control. Ignoring them reduces noise in your Git status, speeds up operations, and avoids unnecessary conflicts. A clean `.gitignore` ensures only relevant project files are tracked.

Illustration for "Crafting a .gitignore that saves your sanity and keeps your repo clean"
Crafting a .gitignore that saves your sanity and keeps your repo clean

Without a `.gitignore`, you'll constantly see files like `.DS_Store`, `Thumbs.db`, `.tmp` files, or `obj/` and `bin/` folders in your Git status. Committing these by accident creates unnecessary commits and can even introduce platform-specific issues for other team members. It’s a simple text file that offers massive returns in project cleanliness and developer focus. Take the time to set it up thoroughly at the start.

a.Essential ignores for common art tools and game engines

  • Art Tool Temporary Files: `*.tmp`, `*~$*`, `*.bak`, `*.autosave` – these are common across Aseprite, Photoshop, Krita, etc.
  • Charios Output Files: Your local Charios export folder or temporary assets generated during preview. These are typically generated on demand.
  • Operating System Files: `.DS_Store` (macOS), `Thumbs.db` (Windows), `desktop.ini` – these clutter your repo without adding value.
  • Game Engine Metadata: For Unity, `.meta` files are crucial but often ignored in specific ways. For Godot, `.import` files are similar. You generally want to track these, but sometimes specific build folders or cache directories need to be ignored.
  • Build Artifacts: `build/`, `bin/`, `obj/`, `Library/` (Unity), `export/` (Godot) – these are generated during compilation or export and shouldn't be version controlled.
  • Local Settings: `.vscode/`, `.idea/`, `UserSettings/` (Unity) – these are developer-specific and not part of the shared project.

Warning:

Be careful when ignoring engine-specific metadata files like Unity's `.meta` files. While you might ignore certain folders, the `.meta` files associated with *tracked* assets should generally be committed. These contain crucial import settings and asset GUIDs, and losing them can break references in your project. Always understand what a `.gitignore` rule is actually doing.

4.The atomic commit: updating characters without chaos

When working on 2D characters, especially with layered source files, small, atomic commits are your best friend. Instead of making dozens of changes across multiple files and then committing everything at once, break your work into logical, self-contained chunks. Did you adjust the hero's run cycle? Commit that. Did you recolor a single prop? Commit that separately. This makes reviewing changes easier and isolates potential issues.

Illustration for "The atomic commit: updating characters without chaos"
The atomic commit: updating characters without chaos

Imagine a scenario where you've tweaked a character's idle animation, added a new attack animation, and changed the texture on their weapon. If you commit all of this together, and a bug appears in the idle animation, it's harder to isolate the cause. With atomic commits, you can pinpoint the exact change that introduced the problem, making rollbacks or fixes much simpler. This discipline is critical for maintaining a stable codebase and asset pipeline.

a.A workflow for focused character updates

  1. 1Start with a clear task: Define exactly what you're changing or adding to the character (e.g., "fix arm clipping in run cycle").
  2. 2Work in isolation: Make only the changes related to that specific task. Avoid scope creep within a single commit.
  3. 3Stage selectively: Use `git add -p` or your Git client's staging area to add only the relevant files or portions of files.
  4. 4Write a descriptive commit message: Explain *what* you changed and *why*. This helps future you (and teammates) understand the history.
  5. 5Push frequently: Don't hoard your changes. Push your atomic commits to the remote regularly, especially when working on a shared branch. This minimizes merge conflicts and keeps everyone updated.

5.Mocap data and Git: managing BVH and Mixamo files effectively

Motion capture data, often in BVH format, presents its own set of challenges. While BVH files are technically text-based, they can be extremely large, especially for long animations or complex rigs. They describe joint rotations and positions over time, and a single character's full suite of animations can easily accumulate hundreds of megabytes. Treating these like any other large binary asset with Git LFS is often the smartest approach.

Illustration for "Mocap data and Git: managing BVH and Mixamo files effectively"
Mocap data and Git: managing BVH and Mixamo files effectively

When you're retargeting Mixamo or other motion capture data onto your 2D character rigs, you're often working with these BVH files. Charios, for example, allows you to snap mocap data to a fixed skeleton, which then drives your layered PNGs. The raw BVH files are the input, and while Charios helps with the retargeting process, you still need to manage the source mocap data efficiently within Git. This is where LFS shines again, keeping your repository light even with a vast library of movements. You can learn more about building a music video with mocap and 2D rigs.

a.Integrating mocap into your Git workflow

  • LFS for BVH: Always track `*.bvh` files with Git LFS. This prevents repo bloat from your extensive animation library.
  • Organize your mocap: Create a dedicated `mocap/` or `animation_sources/` folder in your project to keep raw BVH files separate from processed animations.
  • Processed animation files: Your game engine's animation assets (e.g., Unity's `.anim` files or Godot's `.tres` animation resources) should also be tracked, often by LFS if they become large.
  • Character-specific folders: Keep mocap data relevant to specific characters within their respective folders for better organization.
  • Charios exports: Exported Unity prefabs or GIF sequences from Charios should be handled as normal game assets, usually LFS-tracked if they are large or binary.

6.Branching strategies for animation sprints and feature development

A robust branching strategy is essential for collaborative development and even for solo developers managing complex features. Don't work directly on `main` for anything substantial. Feature branches allow you to develop new animations, character abilities, or entire characters in isolation, without destabilizing the main codebase. This prevents broken builds and reduces the pressure of constantly working on a live version. Treat each major character animation task as its own branch.

Illustration for "Branching strategies for animation sprints and feature development"
Branching strategies for animation sprints and feature development

For example, if you're implementing a new wall jump animation for your platformer, create a branch for it. This allows you to experiment, iterate, and even make mistakes without affecting the stable `main` branch. Once the animation is polished and integrated, you can merge it back. This structured approach is far more sustainable than a "commit to main and pray" strategy, especially when deadlines loom. It’s also crucial for managing different character states, like those discussed in platformer character animation: a complete 2D guide.

a.Your go-to branching workflow

  1. 1`main` is sacred: The `main` (or `master`) branch should always contain a stable, playable version of your game. Only merge thoroughly tested features into it.
  2. 2Feature branches: For every new character animation, new character, or significant art update, create a new branch from `main` (e.g., `feature/hero-attack-animation`, `art/new-enemy-design`).
  3. 3Work in isolation: Develop your changes entirely within this feature branch. Commit frequently and push to the remote feature branch.
  4. 4Pull regularly: Even on a feature branch, pull from `main` periodically to keep your branch up-to-date and resolve potential conflicts early.
  5. 5Code review (if applicable): If you're on a team, have another developer review your changes before merging.
  6. 6Merge with care: Once complete and tested, merge your feature branch back into `main`. Use `git merge --no-ff` to preserve branch history for clarity.

7.Common Git gotchas and how to fix them in 2D projects

Even with a solid setup, you'll encounter Git quirks. The key is knowing how to diagnose and fix them quickly. One common issue is accidentally committing large binary files *without* LFS tracking. This instantly bloats your repo and defeats the purpose of your LFS setup. Another is merge conflicts on `.meta` or `.import` files, often due to simultaneous scene or prefab edits. Understanding these issues saves hours of frustration.

Illustration for "Common Git gotchas and how to fix them in 2D projects"
Common Git gotchas and how to fix them in 2D projects

These aren't just minor annoyances; they can halt development and force painful manual re-creations of work. A team member might pull a broken character rig because of a `.meta` file conflict, or your entire project might grind to a halt while cloning a repo that's grown to 10GB. Proactive management and knowing the common fixes are critical skills for any indie game developer. For instance, managing animation assets carefully is vital, whether it's for a simple wave emote or a complex VTuber head-yaw system.

a.Troubleshooting LFS and large file issues

  • Large file committed without LFS: If you accidentally commit a large binary, use `git filter-repo` (or `BFG Repo-Cleaner` for older repos) to rewrite history and remove the file. Then, commit it correctly with LFS. This is a destructive operation, so backup first.
  • LFS files show as pointers, but don't download: Ensure Git LFS is installed and `git lfs pull` is run. Check `.gitattributes` to confirm the file type is tracked. Sometimes re-cloning the repo can fix stubborn LFS issues.
  • LFS storage limits: Be aware of your Git host's LFS storage limits. GitHub, for example, provides a certain amount for free, then charges for additional data. Plan your storage needs or consider self-hosting LFS if necessary.
  • Corrupted LFS files: If an LFS file seems corrupted, try `git lfs fetch --all` and `git lfs checkout`. If the issue persists, the original file might be corrupted on the LFS server or locally cached.

b.Resolving game engine metadata conflicts

Conflicts in Unity `.meta` files or Godot `.import` files often arise when two developers modify the same asset or scene simultaneously. These are best avoided by clear communication and working on separate, isolated parts of the project.

  • Communicate: Before editing a shared scene or character prefab, announce it in your team chat. This simple step prevents many conflicts.
  • Scene/Prefab locking: Some engines or plugins offer scene/prefab locking mechanisms to prevent simultaneous edits.
  • Merge tools: Use a visual merge tool (like KDiff3 or Beyond Compare) to carefully resolve `.meta` file conflicts. Often, you'll want to accept both sides' changes or manually combine the GUIDs and settings.
  • Revert and re-apply: If a `.meta` conflict is too complex, sometimes it's faster to revert one person's changes for that specific asset, pull the other's, and then re-apply the reverted changes manually.

8.The working setup: a step-by-step workflow for your next character

Let's put it all together. This is the battle-tested workflow that helps solo and small teams manage 2D character assets without the 2 AM panic attacks. It prioritizes prevention over cure and ensures your Git setup supports, rather than hinders, your creative process. Following these steps will build a robust foundation for your character animation pipeline.

Illustration for "The working setup: a step-by-step workflow for your next character"
The working setup: a step-by-step workflow for your next character
  1. 1Initialize your Git repo: `git init` in your project root.
  2. 2Install and configure Git LFS: Run `git lfs install`. Immediately track all common art file types: `git lfs track "*.psd" "*.aseprite" "*.png" "*.jpg" "*.tga" "*.bvh"`. Commit the generated `.gitattributes` file.
  3. 3Create a comprehensive `.gitignore`: Start with a template for your game engine (Unity, Godot) and add specific ignores for your art tools and Charios temporary files. Commit it.
  4. 4Establish `main` branch: Make your initial commit with the basic project structure and your Git config files. Push this to your remote (e.g., GitHub).
  5. 5Feature branch for new character: For each new character or major animation set, create a new branch: `git checkout -b feature/new-hero-animations`.
  6. 6Develop and commit atomically: Work on your character assets. After each logical change (e.g., "finished idle frames," "fixed walk cycle arm"), commit with a clear message. Use `git add -p` for precision.
  7. 7Push regularly: `git push origin feature/new-hero-animations` to back up your work and share with teammates.
  8. 8Integrate and merge: Once the character is ready, tested, and reviewed, merge your feature branch back into `main`. Delete the feature branch locally and remotely.

9.Your character animation pipeline deserves a solid foundation

Building games is hard enough without fighting your version control system. By properly configuring Git LFS and a `.gitignore`, and adopting a disciplined branching and committing strategy, you can eliminate the most common pain points of managing 2D character assets. This setup isn't just about avoiding conflicts; it's about creating a smooth, efficient workflow that lets you focus on the creative work of bringing your characters to life. Your animations, whether a simple shrug emote or complex RTS resource gather, will benefit from this stability. Invest in your Git setup now, and save countless hours of debugging later.

Illustration for "Your character animation pipeline deserves a solid foundation"
Your character animation pipeline deserves a solid foundation

The next step? Take five minutes right now to review your existing project's `.gitattributes` and `.gitignore` files. If you're missing LFS tracking for key art assets, add them immediately. If you're starting a new project, make sure this Git setup is the very first thing you do. Then, you can explore tools like Charios to make your 2D character animation workflow even faster and more integrated, perhaps even checking out our dashboard for a test drive.

Charios team

We build a browser-native 2D character animation tool — drop layered PNGs onto a fixed skeleton and retarget Mixamo or BVH mocap onto the rig. Try Charios →

Published May 12, 2026

FAQ

Frequently asked

  • How do I use Git for large 2D art files like layered PNGs without issues?
    You must use Git LFS (Large File Storage) to manage large binary assets such as layered PNGs, PSDs, or Aseprite files. LFS stores pointers in your Git repository while the actual files are stored on a remote LFS server, preventing repository bloat and slow clone times. Configure LFS tracking for all relevant art file extensions from day one to ensure smooth version control for your character assets.
  • What is Git LFS and why is it essential for 2D character animation projects?
    Git LFS (Large File Storage) is a Git extension designed to handle large binary files more efficiently than standard Git. It replaces large files with small text pointers in your repository, downloading the actual content only when needed. This prevents your repository from becoming excessively large and slow, which is crucial for projects with many layered character assets and mocap data like BVH files.
  • How can I prevent Git conflicts with game engine metadata files in my 2D project?
    Configure a robust .gitignore file to exclude generated metadata files from game engines like Unity's .meta files or Godot's .import files. While some metadata might need version control, ignoring temporary or locally generated files prevents frequent merge conflicts and keeps your repository clean. Focus on versioning only essential project settings and asset references.
  • Can I use Git LFS to version control Mixamo or BVH mocap data for my 2D characters?
    Absolutely, Git LFS is ideal for versioning mocap data such as Mixamo FBX files or raw BVH files. These are typically large binary files that would otherwise bloat your repository and slow down Git operations. Track these file types with LFS to ensure efficient storage and version history for your animation data.
  • Does Charios integrate with Git LFS for managing character assets?
    Charios itself works with standard image files like layered PNGs, which are perfectly managed by Git LFS at the repository level. By setting up Git LFS for your project, any layered PNGs or other large assets used in Charios will be version-controlled efficiently, allowing you to track changes to your character's source art without repository bloat.
  • What's the best branching strategy for a 2D character animation project using Git?
    A feature-branching strategy works well for 2D character projects. Create separate branches for new characters, animation sequences, or significant art updates, then merge them into your main or develop branch upon completion. This isolates changes, allows for parallel development, and keeps your main branch stable.
  • Why does my Git repository get so large and slow when I add new character assets?
    Standard Git is optimized for small text files and struggles with large binary assets like layered PNGs, PSDs, or Blender files. Each version of these files is stored entirely in the repository history, leading to rapid bloat and slow operations like cloning or fetching. Implementing Git LFS is the solution, as it stores only pointers to these large files in the main repository.

Related