rad-games / the-game-01

Apache License 2.0
1 stars 0 forks source link

how to cowork in the project #2

Open zemaqer opened 3 years ago

zemaqer commented 3 years ago

how to clone the project and add it to Unity Hub

  1. download github client from here https://desktop.github.com/ and install it
  2. during the installation process log in into your github account
  3. open the github client, go to "File -> Clone repository..."
  4. make sure "GitHub.com" tab is selected
  5. from the scroll list choose the project "rad-games/the-game-01"
  6. in "local path" input field choose the path where you want this project to be stored
  7. click "Clone" button on the bottom right and click "Initialize git lfs" if asked
  8. open Unity Hub
  9. make sure that Unity 2020.3.19f1 is installed
  10. if not, open this link in the browser to start the installation process (unityhub://2020.3.19f1/68f137dc9bbe)
  11. open "Projects" page in Unity Hub
  12. click "Add" button from top right corner of the window
  13. point it to the location where the cloned repo is stored

how to pull new changes from the server

  1. at the top of the GitHub client there is a line of buttons where you can find:
    • current repository
    • current branch
    • current available action
  2. make sure that current repository is the-game-01. if it's not, then click on the "Current repository" button and find the right repo in the dropdown list.
  3. make sure that current branch is 'main'. if it's not, then click on the "Current branch" button and find the 'main' branch in the dropdown list.
  4. The 'available action' button has the following states:
    • no new changes from the server, no local commits - then it says "Fetch origin" this action will force GitHub client to go to the server and check if there are any new commits in the repo. use it when you know there are commits but you don't see them in your GitHub client.
    • no new changes from the server, there are local commits - then it says "Push origin" this action will submit local commits to the server, so everyone will be able to pull them.
    • there are new changes from the server, no local commits - then it says "Pull origin" this action will download all commits from the server to your computer. if you have any local changes you will need to stash them before pulling new commits from the server.

how to work with stash

stash works with sets of changes. a modified file is a change. if a file was not added to the repository before that's a new file, and that's a change. if a file was removed - that's a change.