For programmers, written code is managed by the source management system, which is very convenient:
- Have history traceable
- Easy to compare code changes.
Non-company projects, before I did not understand git, I used to be modified before CTRL + C, CTRL + V to backup, contrast, this led to a lot of strange problems, such as the hand of the wrong change, coincidence is unexpectedly no backup, so depressed query .... Wasted a lot of time.
As git heats up, I start to focus on the fact that there is no free git--:
Git is a distributed version control system, originally written by Linus Torvalds and used as the management of Linux kernel code, the story behind it is interesting.
I know git has 3 types of git:
- github.com: Public git project free, private git project charges, in foreign countries, the speed of comparison pit
- Git.oschina.net: Public and private projects are free, and at home, speed advantage (advertising: Oschina Xi ' an circle manager)
BitBucket: Support git, Mercurial, free version has 5 user limit. Both public and private warehouses can be created without restrictions, with collaboration tools (Issue Tracker,wiki). Unity 3D official Open Source Address
I choose the key to Git: The function of almost the case, as far as possible to choose domestic, fast speed, not by the wall.
Git's client:
- Gitextensions172setupcomplete.msi 27M: Contains Git's core commands
- Tortoisegit-1.8.11.0-64bit.msi 19M: A shell based on the git command above, with a GUI interface
Configure Git to remember your account password under Windows:
In C:\Users\Administrator\.gitconfig:
Then add the. git-credentials file, configure the account password:
Complete the process of managing unity 3D source with git:
1 new folder (path requires non)
2 New U3d Project
3 Add the. gitignore file
[Get an existing U3D project]
4 Add https://git.oschina.net/xifarm/U3D_Git.git File
5 Modifying the Unity 3D Editor:
- Enable
External option in Unity → Preferences → Packages → Repository . (Skip This step with v4.5 and up)
- Switch to
Visible Meta Files in Edit → Project Settings → Editor → Version Control Mode .
- Switch to
Force Text in Edit → Project Settings → Editor → Asset Serialization Mode .
- Save the scene and project from
File menu.
Unity3d. Gitignore (you want to ignore a file and not commit the file to the repository)
- <code> # =============== #
- # Unity Generated #
- # =============== #
- temp/
- library/
- # ===================================== #
- # Visual Studio/monodevelop Generated #
- # ===================================== #
- exportedobj/
- obj/
- *.svd
- *.userprefs
- /*.csproj
- *.pidb
- *.suo
- /*.sln
- *.user
- *.unityproj
- *.booproj
- # ============ #
- # OS Generated #
- # ============ #
- . Ds_store
- . Ds_store?
- ._*
- . spotlight-v100
- . Trashes
- Ehthumbs.db
- Thumbs.db </code>
Reprint please specify the "C # Programmer to organize the Unity 3D Note (vi): GIT source management"
C # Programmer's Unity3d Notes (6): Using Git