GIT Crash Course: Pull → Commit → Push
Git Install
Download HereGit Navigation
Easy Navigation ChangeDirectory (cd) then tab for completion of Desktop. Terminal can’t read spaces’In order to change Drives → cd driveName: . Then navigate it just like you would if you had started on your main drive.You could also go to the folder where you have the project and open GitBash Here.GitHub Repo
Otherwise Starting a new Repo
Create Repo, make sure to add .gitignore UnityLinking Github to Local Project
A more in-depth walkthru can be found HERE
git initgit remote add origin HTTPS URLgit remote -v = permission | in this repo I can fetch and pushCommit
The order of committing is as follows. Pull → Commit → Push
Pull
git pull
git branch
Git pull and git branch (check what branches are available)This allows us to pull from the main branch, if we had other branches instead of the main branch we would use their name.git pull origin main
*main = means we are on the main branchCommit
git status
Check what is new in the project, and what has not been uploaded. It will be in red.git add Assets/Materials/
git add allows us to add one file at a time.git add .
Git add . allows us to add everything in the project that needs to be updated at once.git commit -m "your message"
Committing with a message.Push
git push origin main
Push from your origin to the branch you wish to make updates to.More Commits
Unity: Save the project in unity after changes.
Bash:
Updating Repo using Gitgit status
git add .
git commit -m "i.e. Cubes and Challenge Script Added"
git push origin main
If you want to know more about me, feel free to connect with me on LinkedIn