1. Version Control System
Using Git
With Little Explanations About How To Setup It In Unity
Dennis Adriansyah Ganda
Amagine Interactive
2. Version Control?
It’s pretty much like this :
You play a game, you’ve get a lot of progress in your game, then
you’re going to beat a very difficult boss. You save your game in
case you’re beaten and want to replay the game
with better strategy.
http://www-cs-students.stanford.edu/~blynn/gitmagic/ch01.html
3. But Unlike game saving system, with version control you can
go back to every point of your progress
S1 S2 S3 S4 S5
9. .gitignore
a.k.a don’t add these things into my repository
DEMO
Computer Generated files
Binary Files
Build folders
Project files
library files (dll, jar, etc)
Usually used for
10. Git for Unity
1. Create Unity project
2. Open Edit → Project Settings → Editor → Version Control Mode
change setting to “Visible Meta Files”
3. Open Edit → Project Settings → Editor → Asset Serialization Mode
change setting to “Force Text”
4. Create .gitignore files and save it in your root Unity project folder (Unity
generates lots of unnecessary files so .gitignore is important) , check next page
for .gitignore samples
5. Create some scenes and scripts, then save all of it
6. Make your first commit
7. Well done now you can work with Git for your Unity projects!
11. My own .gitignore for Unity
Download Here : https://gist.github.com/fugogugo/fbe1aabd3f06aec0e9c4
12. Tips and tricks
Using version control is all about habit. Git, SVN or any other version control
system are just tools ,It will be useless if never use it
Commit as often as you can
Always have that one stable branch
Do experiments in separate branch, merge when finished
Conflicts will always happen in some point of your projects, don’t panic, cool
your head and resolve it one by one
When everything seems so wrong, “git reset - -hard HEAD”
Separate branch that contain main gameplay and another branch that has
plugins added into it (in app purchases, ads, analytic etc)