Git With The Program
How to install git for Unity and other developers
One of the most important tools in any developers kit is git. Whether you are working solo or in a group, git is essential!
Let’s get you up to speed. You can download git here and once you have installed it on your computer, you are ready for the next steps.
If you haven’t already, create an account on github.com and create a new repository.
Now that your repository is created on github, navigate to your local project folder and right click “Git Bash Here”.
Now that your repository is created on github, navigate to your local project folder and right click “Git Bash Here”.
Within the git bash window, the first step is to initialize the folder with “git init”
Now that git is setup locally, it’s time to connect to your github repository with “git remote add origin” and paste the copied URL
You will want to remember to “pull” data from the github server with “git pull origin main” before making changes. This will also insure that your .gitignore file is saved locally.
You now have any new files from the server but you aren’t tracking them yet. Type “git status” to view any untracked files.
To add all untracked files, type “git add .”
Almost there…you need to create a ‘snapshot’ or ‘save’ of your repository and you can do this with “git commit -m <title>”.
Last order of business is pushing your git to the remote server. Just type “git push origin main” and voila.
Congratulations, you have successfully created your first github repository and pushed any local changes to the server. Back on github your repository should show the new files that were merged.