How to Setup Github with Unity the Right Way

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024

ความคิดเห็น • 40

  • @antonjagers3572
    @antonjagers3572 6 หลายเดือนก่อน +5

    Thanks a lot! I followed a other tutorial where I got like 16k files to commit. I'm glad this one has only 28 to commit.

    • @GarnetKane
      @GarnetKane  6 หลายเดือนก่อน

      Amazing! So glad to help - yeah I found a few tutorials on this topic actually didn't cover it accurately and it didn't recognise the git ignores correctly!

  • @juanmuniz6535
    @juanmuniz6535 หลายเดือนก่อน +2

    Dude this was awesome. So easy and effective! Great video.

    • @GarnetKane
      @GarnetKane  หลายเดือนก่อน

      Appreciate it! glad i could help :)

  • @jhonuribe171
    @jhonuribe171 6 หลายเดือนก่อน +1

    tnhks bro! Easyyyyy xD, Greetings from Colombia - Cali

  • @Yukiixs
    @Yukiixs 9 หลายเดือนก่อน

    I was thinking that you were going to cover Ci/cd as well, unity recently disabled activation of the personal editor inside docker container, which makes CI/CD really harder to setup for free projects ( in order to promote their own solutions ).
    Ci/cd allows to automatically build the game, test it, publish it, make static analysis of the code for styling, security,.. rules and opens issues for you… a must have in teams projects

  • @zojirushi1
    @zojirushi1 10 วันที่ผ่านมา +1

    how do you get others to collaborate in the same unity repo/project for a team of 4 people?

    • @GarnetKane
      @GarnetKane  8 วันที่ผ่านมา

      Hey! It would be the exact same setup - but everyone would have access to the main repository as a collaborator so that they can branch off from main/commit to main or their own branch and it’ll get synced across everyone in the project

  • @noway1co
    @noway1co 3 หลายเดือนก่อน +1

    why not just create the unity project inside the git folder intially?

  • @AbdoWahib-k4f
    @AbdoWahib-k4f 29 วันที่ผ่านมา +1

    nice tutorial!!. just try out to display the texts a bit bigger, they are so tiny. Maybe cause u are using a monitor, it's clear for ya, but for us laptop users, it's really hard to see! thanks!

    • @GarnetKane
      @GarnetKane  26 วันที่ผ่านมา +1

      Oooh - really appreciate the suggestion! Will definitely make sure to do that for the next one! Glad you enjoyed the tutorial otherwise :D

  • @countotuscany7061
    @countotuscany7061 7 หลายเดือนก่อน +2

    So are you pushing everything onto GitHub? Including binaries, assets, textures, sounds, models etc?

    • @GarnetKane
      @GarnetKane  7 หลายเดือนก่อน

      Yep definitely - i could be wrong but I think from the git ignore, binary files are ignored, but definitely the rest of them you want to push up.
      Any file that appears in your Github Desktop Application you want to push up (assuming you want to keep those changes)

  • @hermitcat332
    @hermitcat332 3 หลายเดือนก่อน +1

    Holyfuck this is all I needed

    • @GarnetKane
      @GarnetKane  3 หลายเดือนก่อน +2

      Glad it was helpful! Honestly surprised that there wasn't a better tutorial already existing or one that was as straight forward hahaha

  • @HailScreaM77
    @HailScreaM77 7 หลายเดือนก่อน +2

    this does not work for us, i was making test with a colleague on how to use it, but no changes to the hierarchy is reflected on the other machines. The closest we get was trying saving scenes and loading onto hierarchy after pulling latest changes, it manage to somehow work for the first time , but not with additional changes.

    • @GarnetKane
      @GarnetKane  7 หลายเดือนก่อน

      Hey - unfortunately the way github/version control works is you won’t be able to work simultaneously on a branch without one end pushing it up and the other end pulling in the changes

    • @HailScreaM77
      @HailScreaM77 7 หลายเดือนก่อน

      @@GarnetKane i don't think I've understand you, but of course the changes were pushed before being pulled, we know how to use git plz, we test with branches too, we will test again later

    • @HailScreaM77
      @HailScreaM77 7 หลายเดือนก่อน

      it work if you activate LFS, and close unity every time you add, push and pull changes , otherwise Unity will not let git do it job.

  • @josemartins-game
    @josemartins-game 4 หลายเดือนก่อน

    Unity does not work well with Git. I keep losing references to materials or textures just by switching branches, opening and closing the project without touching anything.

  • @MM-wr2kj
    @MM-wr2kj 6 หลายเดือนก่อน +1

    thank you

  • @ryanwinchy
    @ryanwinchy 7 หลายเดือนก่อน +1

    Hey Garnet! Version control for game dev has been something I've been struggling with for a while. The files are just so big and my .gitignore seems to never work. I'm trying to use Github LFS now.
    Is it good practice to VC the project as a whole with all assets, or just the scripts? Just scripts would be a whole lot easier lol!

    • @GarnetKane
      @GarnetKane  7 หลายเดือนก่อน +1

      Definitely would be easy to just have the scripts but it's definitely recommended to do the whole project unfortunately! There's heaps of meta files that would be required and just doing the scripts would probably result in a bunch of conflicts

    • @ryanwinchy
      @ryanwinchy 7 หลายเดือนก่อน

      @@GarnetKane thanks, I got it in the end! I just had to figure out LFS :)

  • @RKelly694
    @RKelly694 7 หลายเดือนก่อน +1

    Hey, this was a brilliant tutorial that worked for me so thank you!!! Just a quick one, i added some code in one of the scripts, then when i look in my repository of the git deskop it didn't show any changes that i can commit? Any advice on what to do. Again, thanks for the brilliant tutorial, i followed a few but none were even close to this!

    • @GarnetKane
      @GarnetKane  7 หลายเดือนก่อน

      Hey! Interesting; the only thing I could think is that the scripts/assets folder wasn't copied over? Otherwise just ensuring the script is saved would be the other obvious answer?
      Let me know if you still have this problem or if you've got a work around, would be interested in hearing what happened!

    • @RKelly694
      @RKelly694 7 หลายเดือนก่อน

      @@GarnetKane so what’s happened was after installing git, I had placed the .gitignore file in the wrong folder. After moving it to the folder containing the unity project files, it started to work!! Also, thank you for getting back to me about the question. I do appreciate it. And I’m still going through your unity project tutorial, it truly is brilliant!!

  • @Iamjake1000
    @Iamjake1000 3 หลายเดือนก่อน +1

    This is good, but if your project gets big enough don't you have to pay? How can I just run this locally? Was using unity's version control but I can see that bill becoming huge quick..

    • @GarnetKane
      @GarnetKane  2 หลายเดือนก่อน +1

      Hey! There’s definitely a paid aspect of github, and github itself recommends projects that are between 1-5gb, but depending on what your purpose is, you’d rarely be going over that limit anyway. Using the git ignore definitely helps as well as it removes unnecessary storage/files that could clutter up the repo. I’ve been using github for all my personal projects for the last 5+ years, all ranging in sizes but i’ve never come across anything where the project files were too much for Github to handle - all on the free tier as well!

    • @Iamjake1000
      @Iamjake1000 2 หลายเดือนก่อน +1

      @@GarnetKane thank you, I'll give it a try with the project that was giving me issues with unitys version control

  • @duhanavc6773
    @duhanavc6773 5 หลายเดือนก่อน +1

    Thak you for explanation. How often should we push? I am begginer so I dont know I dont wanna push any small change I made

    • @GarnetKane
      @GarnetKane  5 หลายเดือนก่อน +1

      Hey! Good question - I would say, conventionally when you’re working in a studio, you will always push what you’re working on at the end of the day to ensure you don’t lose progress. But on top of that, whenever you’re working on a new feature/piece of content that you think is ready to push before you start working on something else, then would be a good time to push up the changes as well.

    • @duhanavc6773
      @duhanavc6773 5 หลายเดือนก่อน +1

      Thanks. I think I got it. I am afradit that if I push so many times it will look bad and bulky in github but I think no need to worry about it

    • @GarnetKane
      @GarnetKane  5 หลายเดือนก่อน +1

      @@duhanavc6773 oh yeah for sure! Don't worry about cluttering up the github commit history at all - it would definitely even be considered better so that issue tracking becomes a lot easier!

  • @fizcore3806
    @fizcore3806 5 หลายเดือนก่อน +1

    Will this sync to my mobile GitHub app?

    • @GarnetKane
      @GarnetKane  5 หลายเดือนก่อน

      Hey! Should do no problems - as long as you’re using the same github account on your mobile as your desktop!

  • @tommallama9663
    @tommallama9663 9 หลายเดือนก่อน

    I was a big fan of using Github but I didn't like that if I had a conflict, my only option was to stash my changes.
    Maybe there is a solution using Gitbash or something, but the Github Client doesn't seem to have a good solution for dealing with conflicts.

  • @hhattonaom9729
    @hhattonaom9729 8 หลายเดือนก่อน +1

    i don't get it.

    • @GarnetKane
      @GarnetKane  8 หลายเดือนก่อน +1

      Ahh damn- what part of it are you having trouble with?

  • @TheGekko
    @TheGekko 4 หลายเดือนก่อน

    In case anyone is still following this guide... Github is case sensitive and unity refuses to work with Unity "just like that".