Add a remote repository without merging

Asked

Viewed 30 times

0

Guys I need a super help!

I develop games in the course I do and use unity3d as Engine.

I own a project that can be versioned by unitycollab, but this is used for production within the Unity development environment. To see the project, I use Github.

I have a problem that every time I need to install the project on the machine to continue the development, I need to add the origin remote to the repository that is hosted in git. But every time I make this addition, I can’t synchronize with the remote repository.

First I do: git init to initialize the project I downloaded from Unity’s collab.

Then add the remote address using remote add origin {link do repositório}

Now, I need to synchronize the downloaded project (collab) with the remote project (Github), give a git pull

Saida ao rodar git pull

git-scm asks me to make a git pull origin master (The default branch is currently build-2). However, when I run the command I have this output.

From https://github.com/juniobiel/flora-game
 * branch              master     -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
        Assets/Arquivos.meta
        Assets/Arquivos/Animations.meta
        Assets/Arquivos/Animations/TitleMenu.anim
        Assets/Arquivos/Animations/TitleMenu.anim.meta
        Assets/Arquivos/Animations/TitleMenu.controller
        Assets/Arquivos/Animations/TitleMenu.controller.meta
        Assets/Arquivos/Fonts.meta
        Assets/Arquivos/Fonts/JandaManateeBubble.ttf
        Assets/Arquivos/Fonts/JandaManateeBubble.ttf.meta
        Assets/Arquivos/Fonts/JandaManateeSolid.ttf
        Assets/Arquivos/Fonts/JandaManateeSolid.ttf.meta
        Assets/Arquivos/Fonts/LICENSE.txt
        Assets/Arquivos/Fonts/LICENSE.txt.meta
        Assets/Arquivos/Fonts/Lemon Juice.otf
        Assets/Arquivos/Fonts/Lemon Juice.otf.meta
        Assets/Arquivos/Fonts/National Cartoon.ttf
        Assets/Arquivos/Fonts/National Cartoon.ttf.meta
        Assets/Arquivos/Fonts/Pine Forest Personal Use Only.otf
        Assets/Arquivos/Fonts/Pine Forest Personal Use Only.otf.meta
        Assets/Arquivos/Fonts/Rationale-Regular.ttf
        Assets/Arquivos/Fonts/Rationale-Regular.ttf.meta
        Assets/Arquivos/Fonts/Schoolbell-Regular.ttf
        Assets/Arquivos/Fonts/Schoolbell-Regular.ttf.meta
        Assets/Arquivos/Maya.meta
        Assets/Arquivos/Maya/TreeHouse.mb
        Assets/Arquivos/Maya/TreeHouse.mb.meta
        Assets/Arquivos/Photoshop.meta
        Assets/Arquivos/Photoshop/Menu.psd
        Assets/Arquivos/Photoshop/Menu.psd.meta
        Assets/Assets Importados.meta
        Assets/Assets Importados/AlignedGames.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Materials.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Materials/atlass_1_1.mat
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Materials/atlass_1_1.mat.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Materials/atlass_1_2.mat
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Materials/atlass_1_2.mat.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment1.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment1/bush_segment_1.fbx
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment1/bush_segment_1.fbx.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment1/bush_segment_1.prefab
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment1/bush_segment_1.prefab.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment3.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment3/bush_segment_3.fbx
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment3/bush_segment_3.fbx.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment3/bush_segment_3.prefab
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/BushSegment3/bush_segment_3.prefab.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/Bush_Segment2.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/Bush_Segment2/bush_segment_2.fbx
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/Bush_Segment2/bush_segment_2.fbx.meta
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSegment/Bush_Segment2/bush_segment_2.prefab
        Assets/Assets Importados/AlignedGames/Polygonal Foliage Asset Package/Art/Models/BushSeg
Aborting

I’ve researched some solutions and I haven’t found one that could help me disregard this merge.

I don’t need Github to merge, because Collab is already responsible for synchronizing the folder with the current version of the project. I just need Github to allow me to bring together new project changes, like code updates and everything...

Does anyone have any idea how I can do that?

1 answer

0


After a few days fiddling with the repositories I arrived at the following solution:

First, I should remind you that the version in git is different from the new machine I’m trying to download the project, so I should clone the repository.

To avoid conflicts within Unity, I delete the entire Library folder (where it contains the package information and so on), you need to do this on account of the collab, it will synchronize with an old list and may give error in the use of the collab itself.

Inside Unityhub, I add the newly cloned project and open it with the editor I need.

Once this is done, Unity will rebuild the Library folder and collab will request the Project Update.

After updating, just close Unity and commit normally in Git to update and keep it synchronized with the repository on the new machine.

I hope you can help if someone faces the same problem...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.