How to Setup a Git Repository for a Unity Project

  Рет қаралды 77,055

Infallible Code

Infallible Code

Күн бұрын

Пікірлер: 141
@InfallibleCode
@InfallibleCode 2 жыл бұрын
🚀 Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP 📦 Git Files (Free Download): www.patreon.com/posts/63076977
@krysidian
@krysidian 2 жыл бұрын
Your videos have reignited my spark when it comes to trying out coding within Unity. It feels like things are slowly starting to click and your videos help me stay inspired. And just when I wanted to create my first project with a git repo, this video pops up, perfect timing!
@mosth8ed
@mosth8ed 2 жыл бұрын
Unless I missed it, you probably should have emphasized that people should *not* be tracking and committing paid 3rd party asset files to public repositories, effectively giving away publishers time and hard work for free.
@hasteovertrample2483
@hasteovertrample2483 2 жыл бұрын
He glossed over a lot of important info. It's all about the views and ego cake, less about actually teaching people how to use the tools correctly.
@seppukun208
@seppukun208 2 жыл бұрын
Oh! That’s great.. I’m now gonna look for free assets now in git repos ☺️
@nikitapestov1711
@nikitapestov1711 2 жыл бұрын
thanks for the idea!!
@jakubstaniszewski304
@jakubstaniszewski304 Жыл бұрын
I am currently lokkinf for advices regarding that problem, how to untrack 3rd party assets and organize some prefabs that are modifications of them, i dont understand fully yet. I.e i have model from studio X that i paid for and lets say it was in prefab in folder named X, that i later unpacked, made some changes an create my old prefab in my folder Prefab. If i would add to git ignore folder X, would i be able to track changes only of my Prefab, so that everything was fine regarding not uploading any data of Studio X to my repo? Where can i find some tips regarding that?
@Draekdude
@Draekdude Жыл бұрын
I still use this for every project I do. I miss ya Charles!
@PeterMilko
@PeterMilko 2 жыл бұрын
Fantastic video, please make a video about source control with source tree.
@IdealIdleIncremental
@IdealIdleIncremental 11 ай бұрын
Thank you for this video. Each time I'm setting up a new repository, I return to it.
@yakanashe
@yakanashe 11 ай бұрын
This video saved me from a corrupted project! Thanks!
@humadi2001
@humadi2001 2 жыл бұрын
I've been struggling for days committing massive temp files, I wish I watched this video sooner. Thank you!
@IdealIdleIncremental
@IdealIdleIncremental 10 ай бұрын
I just want to say thank you again for this great tutorial! I reference to it each time I set up a repo for my every new project. I wish you publish more videos like this!
@MoonJellyGames
@MoonJellyGames 2 жыл бұрын
Thank you. This was super helpful. I've been too intimidated by repositories to use them, so it's a miracle that I haven't lost entire projects. This was a very clear and straight-forward.
@neilfosteronly
@neilfosteronly 2 жыл бұрын
You have the best guide for this topic. I always go back when I forget. Wish it showed up higher on search results.
@dolguldur1833
@dolguldur1833 9 ай бұрын
what an awesome tutorial. everything I needed to know - well explained. your way of talking makes it easy to listen to. gonna watch your videos about design patterns in unity as soon as I'll find the time. I really hope you will continue to make videos. subbed!
@ryleybulmer6282
@ryleybulmer6282 Жыл бұрын
Mannnnn the KZbin search algorithm really fucked me. Where was this video a month ago when I was trying to set up Git for Unity for the first time. I worked it out, but still learned heaps from this video. Thank you, officially subscribed I am still lost on merge requests and pulling when there's merge conflicts. I've resorted to just deleting all the folders on my laptop and just pulling the latest version. A follow up video would be appreciated
@sebastianbryant4216
@sebastianbryant4216 2 жыл бұрын
Perfect timing man, I was just fighting that shit the other day 😆. Love this channel!!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
I love it when this happens!
@mujtabaalmiskeen8886
@mujtabaalmiskeen8886 2 жыл бұрын
A good complementary to this video would be the team workflow, with reviews, PR (pull request), and conflict control, that would give viewers more of a complete picture of team workflow in addition to be as an into to work on open source projects. Although, the team workflow might not concern solo devs but might make it easier for them if they were to have assistance from other people in any project stage
@dopplermonk
@dopplermonk 2 жыл бұрын
really would love to see a video about that!
@dmennenoh
@dmennenoh 2 жыл бұрын
Agree, this would be a great video.
@MegaGameCore
@MegaGameCore 2 жыл бұрын
The term master is only problematic in an US-centric world view and the switch from master to main only creates unnecessary confusion when looking up references or reading books on GIT . IMO it's the same as calling "A Daemon killing a Child" problematic language (this makes perfect sense in a CS context btw.) Besides the unnecessary politics, this is a nice video :)
@RolagLondevert2563
@RolagLondevert2563 Жыл бұрын
Thanks this was super helpful! I just needed the readme also don't make a repo with a readme already in it will make things harder to push.
@parkercole8404
@parkercole8404 2 жыл бұрын
Good, easy to understand verbiage. Also, this man looks very friendly.
@ladrillorojo4996
@ladrillorojo4996 Жыл бұрын
You saved my life. Thank you so much!
@jalilseguel7
@jalilseguel7 11 ай бұрын
awesome tutorial. this can't be more helpful.
@BenjaminLipman3D
@BenjaminLipman3D 2 жыл бұрын
I always like to explain to beginners that "adding" will copy that data change into the .git folder. So if you change that file again, the new changes aren't there yet.
@EricWilliamsCG
@EricWilliamsCG 2 жыл бұрын
I'm pretty sure if Charles needed a 3d model, he'd type it out long hand ascii fbx, or maybe command line that creates an ascii fbx. He never uses any tools that use that thing to the right of his keyboard :P
@InfallibleCode
@InfallibleCode 2 жыл бұрын
I’ll never get carpal tunnel!
@andreyradostny
@andreyradostny Жыл бұрын
Thank you bro, it was clear and informative
@jasonnumberxiii
@jasonnumberxiii 2 жыл бұрын
Thank you so much, sir! You have solved my problem in a couple of minutes!
@iljatarasovs4416
@iljatarasovs4416 2 жыл бұрын
clear, no questions 👍
@nareshbisht7620
@nareshbisht7620 Жыл бұрын
Good exp;antion. Loved it. Thank you.
@danieldiniz6421
@danieldiniz6421 2 жыл бұрын
perfect video! thanks for the gitignore and attributes files!!!
@Yearning.Astrophile
@Yearning.Astrophile 2 жыл бұрын
very informative , clean simpler to understand
@veridisquo119
@veridisquo119 Жыл бұрын
thanks very easy to follow and understand
@haku_doku
@haku_doku 10 ай бұрын
really helpful, thank you!
@KuzmaProDev
@KuzmaProDev 10 ай бұрын
Thanks, your video helped me to discover that I ignored *.meta files, so I replaced .gitignore with correct version for unity. The default one was for visual studio and it doesn't work good with unity ignoring important files.
@Lord_Of_The_Beer
@Lord_Of_The_Beer 2 жыл бұрын
Yeah, this worked out great for me. Thanks so much.
@PinkPanteRus
@PinkPanteRus Жыл бұрын
Super usefull video! Thanks!
@ronengershkovich8405
@ronengershkovich8405 Жыл бұрын
thank you so much ! very clear and concise.
@stavi975
@stavi975 2 жыл бұрын
thank you for the guide, very informative, very helpful, there was a few problems that i ran into, but i managed to work over them!
@yourmom6798
@yourmom6798 2 жыл бұрын
Could you make a video about how to work with 2 people using this, because we are countering some issues with the pull and push actions. Loved the video!
@d0rkza
@d0rkza Жыл бұрын
Git shouldn't be a compicated thing. The main thing to do is always use separate branches and when your work is finished and tested you merge back to "Main" branch. I'll give you an example workflow: Dev1 first pulls all changes on "Main" branch and creates a new local branch from it, lets call it "Dev1Branch". He/she then does all the black magic/voodoo stuff developers does and commits it to his/her branch. When you're done and want to push it to other people you should push your branch to the remote repository (for safe keeping), keep in mind all changes have to be commited. Now change back to "Main" branch and pull changes again to be up to date. Now merge from "Main" to "Dev1Branch" branch. This way you can fix any merge conflicts and make sure everything works before you merge "Dev1Branch" back to "Main". There are 3 main things to remember: 1) Always make branches from an updated "Main" branch 2) Never make any changes on the "Main" branch. Just merge from other branches 3) Before merging to "Main" branch first update it and merge into your branch. This way you avoid any potential merge conflict and breaking changes on the "Main" branch.
@wildBcat
@wildBcat Жыл бұрын
Thank You!
@gamingmode8942
@gamingmode8942 2 жыл бұрын
Such a gold video!! You explained it amazing! Thank you so much!!!! You make new developers better!
@vanshrana9508
@vanshrana9508 2 жыл бұрын
Thanks a lot for this video, It was Awesome! helped a lot
@pitipito
@pitipito 2 жыл бұрын
Lovely video mate, really good explanation and all calmly and understandable. Thanks a lot!!
@skystuhr3227
@skystuhr3227 Жыл бұрын
Thank you 😭😭😭
@raploky
@raploky 2 жыл бұрын
Thanks! It helped me a lot!
@saltyspacenerd5581
@saltyspacenerd5581 2 жыл бұрын
Once again thanks for all of the really helpful content. It really is incredibly valuable, especially to a self teaching noob like myself.
@Shadogi
@Shadogi Жыл бұрын
This is a really great tutorial (especially the large file tracking), but instead of using the command line like this, you should use the GitHub UI (if using GitHub or another visual solution). I've been a professional engineer for over a decade and the GUI makes limits your ability to do dumb shit. Sure, you can do more on the command line, but 95% of what you're going to need can be done through the UI. The command line tools are installed alongside them so they're always there if you need them
@MrSmoofist
@MrSmoofist 2 жыл бұрын
Why not just use GitHub Desktop? Easy to manage, see all changes, open repositories or branches, supported by GitHub
@kozuskoo
@kozuskoo Жыл бұрын
I really don't understand why programmers love so much terminal solutions. For some specific uses, ok, but use them instead of graphic solutions just because yes. Don't make sense to me.
@luaiv555
@luaiv555 Жыл бұрын
thanks so much
@lemmysnickers
@lemmysnickers 2 жыл бұрын
Any chance you could show how to collab on a project? F.ex. creating branches and merging them?
@lemmysnickers
@lemmysnickers 2 жыл бұрын
@@Dfjs427 thanks. I'll look into it!
@azgan123
@azgan123 2 жыл бұрын
Thanks. I just renamed my branch from main to master and will continue to do so.
@BanditBloodwyn
@BanditBloodwyn 2 жыл бұрын
Does this approach work for the Visual Studio integration of Git? If yes, what we have to be aware of?
@free2468
@free2468 Жыл бұрын
What did you press to save the logs file?
@Nine9Hundred00
@Nine9Hundred00 Жыл бұрын
Great tutorial, but people need to understand words can have multiple meanings. Master can mean "principal" or "main" and it's clearly how it's used here. It's not "a master branch that has slave branches under it". On one hand you think you are making tech more inclusive, on another you are pushing a US-centric problem and reducing the great nuances present in the English language by not even considering that words have different meanings in different contexts. That's why I think this particular debate is doing more harm than good : making people angry and less receptive to other changes that _would_ make tech more inclusive.
@ragnorucca6637
@ragnorucca6637 Жыл бұрын
100% agree
@floccinaucinihilipilificat6749
@floccinaucinihilipilificat6749 2 ай бұрын
bro has never used tkinter
@KeeanFerreira
@KeeanFerreira Жыл бұрын
Lifesaver
@spacebobyt6422
@spacebobyt6422 Жыл бұрын
I now set up a repository on github and followed the tutorial must the other debs follow the tutorial too or how will they have access to the repository
@rossakis3181
@rossakis3181 2 жыл бұрын
Hey @Infallible Code what’s your opinion on Plastic SCM that is now integrated into Unity ? Would you replace your Git-Unity workflow with it ?
@redeamed19
@redeamed19 2 жыл бұрын
I'm curious about this as well. I just started using Plastic myself on a personal project. Still adjusting to the differences, but I like having the integration right in the project. I hope to see a channel like this one do a comparison of the different approaches.
@ozenn1297
@ozenn1297 2 жыл бұрын
Hi, it's really helpful tutorial. Thank you for your effort :)
@CharlesBintang247
@CharlesBintang247 Жыл бұрын
Terima kasih!
@BrandonNyman
@BrandonNyman 2 жыл бұрын
CLI failed on the last step for me as it wouldn't load the local host after authorising so I had to use github desktop to push the commit.
@irtezarahman5370
@irtezarahman5370 2 жыл бұрын
And why should I use cmd instead of github desktop? Any good reason and ease of use of cmd in this case?
@mani98
@mani98 2 жыл бұрын
I'm a webdeveloper and have noticed that git doesn't work as smooth with unity because of conflicts that keep popping up in binary files. Some people mention that Unity Collab handles those a bit better. Could you maybe make a vid comparing different version control methods?
@JohnWellingtonWells
@JohnWellingtonWells 2 жыл бұрын
Unity Collab is being fazed out in favor of Plastic SCM. While I've only used it a bit so far, it seems to be way more stable than Collab which always caused me a bunch of problems. The advice I've often been given is to use git mainly for code and Collab/Plastic SCM for the actual game files(if you want to use git at all).
@Slowline.
@Slowline. 2 жыл бұрын
Unity comes with a merger tool which helps resolving conflicts in .asset, scenes and some other stuff here is a talk from microsoft with a timestamp containing the steps to configure that tool, maybe that will help resolve your problems with conflicts? kzbin.info/www/bejne/fZ61gXaiabKteaM
@bobmcbob4399
@bobmcbob4399 2 жыл бұрын
That's because you are using the default binary unity asset serialization which is breaking git, hence the binary file conflicts. To fix this (and also a bonus so that you can see the text mode file changes yourself) is to tell unity to serialize it's assets in Text form, not Binary. Do this with Edit -> Project Settings -> Editor -> Asset Serialization -> Force Text dropdown option.
@henrylecompte4533
@henrylecompte4533 2 жыл бұрын
Unity Collab has been officially fazed out in favor of Plastic SCM. Anyone using Collab was forced to migrate. Apart from that Plastic is great. Still can’t merge binary files because it’s not really possible to make a general binary merger. You can choose whose version to use though pretty easily.
@pliskin100
@pliskin100 2 жыл бұрын
What do I do if I have an already existing unity repo and need to add it to unity hub? What do I do if the project is a different version?
@hoshinoarika857
@hoshinoarika857 2 жыл бұрын
Great video! I would like to ask if I want to set up my own Git LFS serser, is there any difference from setting up a normal Git server?
@wadelkane
@wadelkane 2 жыл бұрын
please i have a situation i have the project on windows and i have the same project on mac air. i would to create a versioning around scritps to allow my mac to take and update scripts easily so please can you share with us how to do merging of script please ?
@fauzannrifai
@fauzannrifai 2 жыл бұрын
Hi, thank you for the video. Recently I've used the git LFS and track some large file. The tracking and uploading to the cloud is success full but then every new clone I did the large file didn't have a meta file and no change record from previous commit. how can I fix this?
@takeowatanabe8763
@takeowatanabe8763 2 жыл бұрын
Should all members of the project have installed git lfs? or if i setup it in the initial commit is enough?
@RedLionYTB
@RedLionYTB 2 жыл бұрын
Isn't GitHubDesktop doing the same thing? (also it's more user-friendly)
@FuzzyCuff2010
@FuzzyCuff2010 2 жыл бұрын
There's a few git Gui options. Personally I prefer GitKraken. It's much more powerful, and informative. You can visually see where you branches are and better collab. Plus it has built in merge tools and extra addons for things like globoards and timeline tracking. So you can check off bugs and assign them to which commit the bug was fixed on.
@captainufo4587
@captainufo4587 2 жыл бұрын
@@FuzzyCuff2010 GitKraken is great but it has recently restricted some stuff to the paid version (which is totally worth it for professionals - who I hope don't need a KZbin tutorial to know what source control is - , debatable for hobbyists). I find SourceTree a nice and clean and fully free Git GUI.
@turkeyjerkey
@turkeyjerkey 2 жыл бұрын
Yeah, I use GitHub Desktop, and like the "Add local repository..." menu command. It'll ask you if you want it to perform a 'git init' on your newly-created Unity project, and then ask if you want to install Git LFS for the repo. Works like a charm!
@BobrLovr
@BobrLovr 2 жыл бұрын
@@Dfjs427 he says on a beginner git video lmao
@FZerbinatti931
@FZerbinatti931 Жыл бұрын
@@FuzzyCuff2010 thanks to this i managed to push my code on github, thanks man
@mikecu2249
@mikecu2249 Жыл бұрын
Great Tutorial, a bit robotic in pronounciation :D but amazing step by step
@mr_dher
@mr_dher 2 жыл бұрын
Hey, I once won your giveaway. You never sent it.
@fhy-jack
@fhy-jack 2 жыл бұрын
could you make a video about merging conflicts on Unity scenes?
@Druelbozo
@Druelbozo 2 жыл бұрын
I signed up for this news letter and never got /:
@MegamanXGold
@MegamanXGold 2 жыл бұрын
Oh wow... you frame this guide for newbies, and then you casually use VI of all editors. The first time I tried to use VI was a certifiable nightmare. I actually stopped the video just to say this. I'm not mad, just... wow. I wouldn't even mention VI to newbies in fear of them getting stuck in it. I won't even use it without a cheatsheet handy.
@brothermanben7140
@brothermanben7140 2 жыл бұрын
master is absolutely not insensitive or problematic. It has no relation to slavery. Its a master copy, the branches aren't slave branches the relationship is not the same
@mrslake7096
@mrslake7096 2 жыл бұрын
using source tree is waaaaaaaaaay faster & easier than command line
@JustinS06
@JustinS06 2 жыл бұрын
The first command line already completely breaks for me.
@rorschacht8478
@rorschacht8478 2 ай бұрын
If you ever feel worthless, remember that some people are so fragile that they have to rename master to main.
@marksmithcollins
@marksmithcollins 2 жыл бұрын
Are you saying you should rename branch not because of technical problem, but of word 'master' is problematic? What a disgusting hypocrisy...
@jozejerse6777
@jozejerse6777 2 жыл бұрын
bonus step: you can rename your branch main to master to be less inclusive.
@LotionSoronarr
@LotionSoronarr 2 жыл бұрын
"Problematic lanugage"... What a bunch of humbug. My branch stays master.
@libberator5891
@libberator5891 2 жыл бұрын
"How to say you're racist without saying you're racist" It's "problematic" because the words master is often paired with slave. And I don't know if you know this, but slavery is bad
@LotionSoronarr
@LotionSoronarr 2 жыл бұрын
@@libberator5891 And I don't care, because I'm not traumatized or scared by words. Especially not when extreeme mental gymastics and reaching have to be used to somehow try (and fail) to justify it. Forbidden words are an insult to common sense. You know, the word slavery - that you used - has the word slave in it. Perhaps you should censor yourself.
@bobmcbob4399
@bobmcbob4399 2 жыл бұрын
@@libberator5891 And White people got rid of slavery. Let's not forget that one.
@bobmcbob4399
@bobmcbob4399 2 жыл бұрын
Mine is specifically "master", because that is the convention and means "master work" for which my code is my master work.
@EricWilliamsCG
@EricWilliamsCG 2 жыл бұрын
@@libberator5891 Go to Japan and tell them that they shouldn't be using the swastika even if they think it means something completely different than attempted genocide. We can't cancel every word or symbol because it meant something bad in the past. Master class is an advanced class, martial arts teachers are often called masters, there are webmasters and all sorts of other uses of the word, if you're reminded of slavery then you need to expand your mind a little and stop being so focused on the negative.
@hasteovertrample2483
@hasteovertrample2483 2 жыл бұрын
I understand the need for keeping the videos short but you skipped over a lot of important information about setting up the initial Git settings, and I find that to be very inconvenient and let me to finding this video ultimately unhelpful...
@DevSync232
@DevSync232 9 ай бұрын
volim te (no gay)
@GrayKuma
@GrayKuma Жыл бұрын
Bonus step: Main should be renamed to master if possible. Unless you want to show your lack of common sense.
@IOwnMyWiiULEGIT
@IOwnMyWiiULEGIT 2 жыл бұрын
Using GitHub. The command line area thing is not what I'm seeing. You lost me.
@SufferDYT
@SufferDYT Жыл бұрын
And I'll call my branch master, thank you. Keep your politics out of my software.
@medecauOne
@medecauOne Жыл бұрын
software, as with any tech, is not apolitical, it is not neutral
@SufferDYT
@SufferDYT Жыл бұрын
@@medecauOne Nice assertion.
@captn_hanky
@captn_hanky 2 жыл бұрын
I am here because of this shit called plastic scm
@LaCreArthur
@LaCreArthur 2 жыл бұрын
Really good video as always. But this master to main thing because of "cultural sensitivity" is sooo BS, what a waste of time & energy theses days for all theses inclusive bs when there are much bigger problem in society RN...
@udyfrost6380
@udyfrost6380 2 жыл бұрын
LIke honestly, I am an African here and i really cringed hearing that
@LaCreArthur
@LaCreArthur 2 жыл бұрын
​@@udyfrost6380 so, as a human being, you cringed because of a word used in a context of a computer system to describe accurately it's role, according to one definition of master ("master noun [C] (COPY) an original version of something from which copies can be made") ??? How is this helping ?
@udyfrost6380
@udyfrost6380 2 жыл бұрын
@@LaCreArthur i don't mean from you, i mean from the narrator. I agreed with you
@ragnorucca6637
@ragnorucca6637 Жыл бұрын
dont bring politics into code mate lol good video otherwise
@bitmammothOG
@bitmammothOG 2 жыл бұрын
tbh the wokeness is cringe af
@jcx5750
@jcx5750 2 жыл бұрын
OMG, WHAT A WASTE OF TIME, JUST USE GIT FOR DESKTOP AND GITHUB ITSELF!!!!
@handler_music
@handler_music Жыл бұрын
that master renaming is bullshit
@Grave1001
@Grave1001 2 жыл бұрын
My master will not like that I renamed the main branch and he will be upset. Not very inclusive :)
@nadieninguno2722
@nadieninguno2722 Жыл бұрын
Querido amigue, todo iba tan bien hasta que la cagaste con lo de la inclusión y lo del master....
@nocultist7050
@nocultist7050 2 жыл бұрын
Chessmaster should really change their name to something more culturally sensitive.
@IconicSpitfire
@IconicSpitfire Жыл бұрын
My brother in Christ the only “problematic language” is that woke nonsense.
@journeyGameStudio
@journeyGameStudio 2 жыл бұрын
Thanks for this! Really helped me
@Borelzin_
@Borelzin_ 2 жыл бұрын
It helped me a lot!!! thank you!!!
Command Pattern in Unity
11:21
Infallible Code
Рет қаралды 76 М.
Using Unity with Git in 15 minutes
15:19
BiteMe Games
Рет қаралды 7 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 6 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 209 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,4 МЛН
3 Interesting Ways Scriptable Objects can fix YOUR Unity3d project now!
24:29
Jason Weimann (GameDev)
Рет қаралды 87 М.
4 Tips for Refactoring Your Code for Readability
14:58
Infallible Code
Рет қаралды 31 М.
Watch This Before Working on a Big Game in Unity
18:44
John Leorid
Рет қаралды 299 М.
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 315 М.
11 Things You (Probably) Didn't Know You Could Do In Unity
13:49
Game Dev Guide
Рет қаралды 155 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 233 М.
Here's How You Should Be Thinking About Data
10:56
Infallible Code
Рет қаралды 36 М.
How GIT works under the HOOD?
16:01
Tech With Nikola
Рет қаралды 204 М.
How Thinking in Systems Can Improve Your Code
10:16
Infallible Code
Рет қаралды 32 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 6 МЛН