Why Nubosoft Uses Git and LFS: At Nubosoft, we rely on Git combined with Git LFS (Large File Storage) to handle large Unity assets like textures, models, and audio files. Git LFS prevents repository bloating and keeps versioning fast and efficient. We believe open-source solutions like Git offer more flexibility and predictability than Unity’s built-in services, which charge a per-seat fee. Additionally, we can use our own LFS space for projects beyond Unity.
Differences Between Version Control Systems
Git: A distributed system where each user maintains a complete project history, enabling offline work and flexible workflows, including branching and merging.
SVN: A centralized version control system that requires a connection to the main server. It supports simpler workflows but is less scalable compared to Git.
Perforce: A centralized system optimized for managing large binary files, commonly used in game development and industries handling extensive asset files.
Unity Version Control: Offers comprehensive version control features, including branching, merging, and file locking, tailored for Unity projects. It integrates seamlessly with the Unity Editor, enhancing team collaboration.
Understanding .gitignore Files: To keep repositories clean, it’s important to exclude unnecessary files. Unity or Visual Studio generates many temporary files that shouldn't be tracked. A proper .gitignore
file prevents bloating and conflicts. Find the latest recommended files for different purposes here: https://github.com/github/gitignore
Major Benefits of Version Control: Using version control ensures you never lose old data, can safely update, and confidently refactor projects. Backups are crucial—even for solo developers—to protect against data loss and errors. Tracking progress over time also becomes seamless.
No backup, no pity! Don’t be lazy—make it a habit! The first thing we do when creating a new project is set up the GIT repository, even for prototypes.
Best Practice – Use Feature Branches: For major refactoring or new features, create separate branches. Even when working alone, this keeps the main branch stable and reduces the risk of breaking the project.
Why Rebasing Matters: Rebasing keeps your commit history clean and linear. It allows smooth integration of upstream changes without messy merge commits. This is especially helpful when collaborating in large teams.
A common scenario is when two developers work in parallel, each making several commits before pushing. To stay aligned with the latest changes, developers can use the following command to rebase
their local branch onto the remote branch—provided no conflicts occur. This practice also applies to different branches.
git rebase origin/main
A---B---C branch (Developer 1 - local) / D---E---F---G main (Developer 2 - remote) | A'--B'--C' branch (Developer 1 - local) / D---E---F---G main (Developer 2 - remote) |
By following these best practices, you can safeguard your Unity projects, improve collaboration, and maintain a clean development workflow.