GitHub teamwork tips
GitHub teamwork tips
When you work on the Vuforia project in a team, GitHub should contain the project files that everyone needs, but it should not contain large generated files or local package archives. This keeps the repository smaller, easier to clone, and less likely to run into merge conflicts.
Use the course package repository
For this course, install Vuforia Engine 11.4.4 from this GitHub repository:
https://github.com/mcloots/vuforia_package_11.4.4.git
This avoids pushing the local com.ptc.vuforia.engine-11.4.4.tgz archive to your project repository. Unity stores the Git package reference in Packages/manifest.json, which is small and can safely be committed.
Install Vuforia in Unity
- Open the Unity project.
- Open
Window > Package Manager. - Click the
+button. - Choose
Add package from git URL.... - Enter this URL:
https://github.com/mcloots/vuforia_package_11.4.4.git
- Click
Add. - Wait until Unity imports the package.
After installation, commit these files:
Packages/manifest.json
Packages/packages-lock.json
Recommended workflow
Commit the Unity project configuration and package references, but do not commit local package archives or generated Unity folders.
Do not commit the local Vuforia archive
The file com.ptc.vuforia.engine-11.4.4.tgz is the Vuforia Engine package archive. It can become large and it is not useful to review or merge in Git. Add it to .gitignore so it does not end up in the repository.
Add this line to the .gitignore file in the root of your Unity or Flutter project:
com.ptc.vuforia.engine-11.4.4.tgz
If the package is stored in a subfolder, you can use a broader pattern:
**/com.ptc.vuforia.engine-11.4.4.tgz
After cloning the project
When a teammate clones the repository, the project will not include the com.ptc.vuforia.engine-11.4.4.tgz file anymore. That is expected. Vuforia should be restored from the package reference in Packages/manifest.json.
- Clone the repository.
- Open the project in Unity.
- Wait until Unity resolves the packages.
- If Unity asks to update or import the package, accept it.
If Unity does not restore the package automatically, add it manually through Window > Package Manager > + > Add package from git URL... and use:
https://github.com/mcloots/vuforia_package_11.4.4.git
Check before committing
Before you push your work, always check the Git changes:
git status
Make sure that com.ptc.vuforia.engine-11.4.4.tgz is not listed as a new file. If it still appears, check whether the .gitignore rule is in the correct project folder.
If the package was already committed
If the package was already added to Git earlier, adding it to .gitignore is not enough. Git will keep tracking files that are already committed.
Run this command once to stop tracking the package while keeping the local file on your computer:
git rm --cached com.ptc.vuforia.engine-11.4.4.tgz
Then commit the updated .gitignore and the removal of the tracked package:
git add .gitignore
git commit -m "Ignore local Vuforia package archive"
Do not delete your teammate's setup
Only remove the package from Git tracking. Each teammate can keep their own local copy and install it again through Unity's Package Manager when needed.
Team agreements
- Pull the latest changes before starting work.
- Use clear branch names, for example
feature/image-target-sceneorfix/android-build. - Keep commits focused on one change at a time.
- Commit
Packages/manifest.jsonandPackages/packages-lock.jsonwhen package dependencies change. - Do not commit generated build folders such as
Library,Temp,Build, or exported Android build output. - Mention in the pull request if teammates need to update or restore Unity packages.