Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Git for Unity

Discussion in 'Editor & General Support' started by rmele09, Jun 18, 2023.

  1. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    690
    Does anybody have a link for Git for Unity that is working? The ones posted that I tried are not working.

    Thanks!
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,769
    Just use Github desktop.
     
    rmele09 likes this.
  3. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    690
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,769
    It doesn't work with Unity and it doesn't need to. You just version control your project folder completely independant of Unity.

    Git Hub has a git ignore template for Unity.
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    No. There are like TEN BILLION git / source control tutorials. This is a Very Well-Understood Problem(tm)

    If you are not capable of learning from those tutorials, you absolutely will not learn it in this little tiny box!!!

    Start with this: there's a TON of information.

    PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL

    Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

    Here is how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally the ONLY folders you should ever source control are:

    Assets/
    ProjectSettings/
    Packages/

    NEVER source control Library/ or Temp/ or Logs/
    NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

    Setting git up with Unity (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

    If you plan on joining the software industry, you will be required and expected to know how to use source control.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
    wccrawford likes this.
  6. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    690

    I just need to be able to do this. Anybody know how to set this up?
     
  7. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    https://git-scm.com/downloads
    Download, install, restart. It should work just fine.
     
    rmele09 likes this.
  8. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    690
    thank you. I just downloaded the unity git package off git and imported that into unity and it seemed to work. Unfortunately the toon shader url from git keeps importing with errors! no fun