2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
This article records how to use gitunity The project is version managed and can be transferred to GitHub remotely.
name | Version |
---|---|
windows | 11 |
Unity | 2202.3.9.f1 |
git | N.A. |
github | N.A. |
ssh-keygen -t rsa
cd ~/.ssh
dir
cat id_rsa.pub
3. Copy the contents of id_rsa.pub to the Deploy keys under the repository's Settings
Configure git for the Unity project folder
git init
添加 .gitignore (此步为重点,可避免上传冗余文件:可直接从此处下载放在文件夹里即可 https://github.com/github/gitignore/blob/main/Unity.gitignore)
添加 .gitattributes (此步为重点,可直接从此处下载放在文件夹里即可 https://github.com/gitattributes/gitattributes/blob/master/Unity.gitattributes)
git add .
git commit -m "自定义备注"
git status
git remote add origin <[email protected]:xxx/xxx.git>
git push -u origin master #上传至branch: master,可根据需要换至其他branch
git status
git log
refer to:
https://unityatscale.com/unity-version-control-guide/how-to-setup-unity-project-on-github/