Unity GitHub Repository
For create a Git repo, go to https://github.com/
Sign in with your account, and click on “new” button.
Now you can give a name to your project, and a description.
You can choose if your repo is public or private, the difference is that if you set repo private only you and those you invite to repository can see it.
Other important part is add the .gitignore to unity
Now we have to link Github to our local project.
After repo is created, click on “Code” and copy the URL.
Then, go to the folder of our project, right click and open Git Bash Here.
In the open window write git init for initialize the repo.
For add repo to web server, write
git remote add origin, and copy your URL
For verifying type git remote -v
That means we now have a link to origin server, and we have a permission to fetch and pull the origin.
This is very important : To avoid merge problems conflict, there is an order to do things that will almost always avoid this type of problem, expecially when work with other people :
PULL from the server, COMMIT, and PUSH.
Type
to see a list of command and the collaborate section with explanation of fetch, pull and push
After pull the project,
git pull
need to decide with what branch we want merge.
The branch is the point where we actually working.
With git branch can see every available branch in the project
Now i have to merge origin branch to master, so write
git pull origin master
that it means pull from origin and merge to master