C # Programmer's Unity3d Notes (6): Git usage

Source: Internet
Author: User

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:

      1. Enable External option in Unity → Preferences → Packages → Repository . (Skip This step with v4.5 and up)
      2. Switch to Visible Meta Files in Edit → Project Settings → Editor → Version Control Mode .
      3. Switch to Force Text in Edit → Project Settings → Editor → Asset Serialization Mode .
      4. Save the scene and project from File menu.
    Unity3d. Gitignore (you want to ignore a file and not commit the file to the repository)
       
      
    1. <code> # =============== #
    2. # Unity Generated #
    3. # =============== #
    4. temp/
    5. library/
    6. # ===================================== #
    7. # Visual Studio/monodevelop Generated #
    8. # ===================================== #
    9. exportedobj/
    10. obj/
    11. *.svd
    12. *.userprefs
    13. /*.csproj
    14. *.pidb
    15. *.suo
    16. /*.sln
    17. *.user
    18. *.unityproj
    19. *.booproj
    20. # ============ #
    21. # OS Generated #
    22. # ============ #
    23. . Ds_store
    24. . Ds_store?
    25. ._*
    26. . spotlight-v100
    27. . Trashes
    28. Ehthumbs.db
    29. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.