Setting Up | Unity Source Control | BitBucket and Visual Studio
When making changes to scripts in Unity it is always wise to use version control software to manage source code changes. It allows changes to be tracked, reviewed and approved, and if necessary, rolled back. In this video I show you how to use Git, Bitbucket and Visual Studio to manage the source code of a sample Unity project.
Key commands in the video are:
git init (to initialise the local git repos)
git add --all (to add files to the repos)
git commit -m "some text" (to commit the files and leave a message)
git remote add origin [url to remote repos] (point to a remote repos)
git pull origin master --allow-unrelated-histories (pull down from a repos)
git push -u origin master (push to a repos)
git checkout -b "name of branch" (checkout a branch with the name)
git push --set-upstream origin "name of branch" (if branch doesn't exist)