• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED Github and GMS2 - Can't Import Project into Repository

BQubed

Member
I'm not entirely sure if this is the correct place to post this but here goes.

Basically the "Import Project into Repository" option in the Source Control menu is greyed out. I'm fairly new to Github but I've been using it to backup my project and until recently it's been going fine. I just formatted my PC and when I came back, I had issues staging changes. Whenever I clicked to stage all changes it would take some time to load and nothing would happen. So I deleted the repository and made a new one to import into but that button is still greyed out.

Is there some kind of option somewhere that I missed? I've done a lot of reading but none of it proposes a solution to this issue.
 

FrostyCat

Redemption Seeker
Situations like this are better resolved through the command line than the Source Control UI in GMS 2.

Open a command prompt window, cd to your project's working directory and post the outputs of the following 3 commands:
GML:
git status
GML:
git branch -a
GML:
git remote --verbose
Your project is behaving like this likely because it got unhooked from your remote or even from Git altogether.
 

BQubed

Member
git status
Git:
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    sprites/sprite48/18298abd-3d61-41bb-8873-cb16a5244959.png
        deleted:    sprites/sprite48/2b4f20ff-f848-47ec-adc0-3ea1d4d569a2.png
        deleted:    sprites/sprite48/c3376501-1fd7-4c92-a1d8-723ed69da979.png
        deleted:    sprites/sprite48/ed8716be-b074-48c8-a417-8839c2c08bb6.png
        deleted:    sprites/sprite48/layers/18298abd-3d61-41bb-8873-cb16a5244959/ae4e620d-0d17-4315-abef-008c0b95ac3d.png
        deleted:    sprites/sprite48/layers/2b4f20ff-f848-47ec-adc0-3ea1d4d569a2/ae4e620d-0d17-4315-abef-008c0b95ac3d.png
        deleted:    sprites/sprite48/layers/c3376501-1fd7-4c92-a1d8-723ed69da979/ae4e620d-0d17-4315-abef-008c0b95ac3d.png
        deleted:    sprites/sprite48/layers/ed8716be-b074-48c8-a417-8839c2c08bb6/ae4e620d-0d17-4315-abef-008c0b95ac3d.png
        deleted:    sprites/sprite48/sprite48.yy

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        ASSETS/Sprites/guard1_strip4.png
        sprites/sGuard/18298abd-3d61-41bb-8873-cb16a5244959.png
        sprites/sGuard/2b4f20ff-f848-47ec-adc0-3ea1d4d569a2.png
        sprites/sGuard/c3376501-1fd7-4c92-a1d8-723ed69da979.png
        sprites/sGuard/ed8716be-b074-48c8-a417-8839c2c08bb6.png
        sprites/sGuard/layers/
git branch -a

Git:
* master
  remotes/origin/master
git remote --verbose

Git:
origin  https://github.com/BQubed/Project_Scratch.git (fetch)
origin  https://github.com/BQubed/Project_Scratch.git (push)
 

FrostyCat

Redemption Seeker
This looks already set up. The Import button is disabled because Git is already ready to go. Just use it normally.

If you're ready to commit now, try doing it with the command line instead and compare the speed with the UI:
Code:
git add .
git commit -m "Your message here"
 

BQubed

Member
The repository that it's setup for (Project_Scratch.git) no longer exists. I'm currently trying to push to another newly setup repository but unfortunately it seems tied to the previous repository. Trying to find a way to connect it to the new repository but the method I used originally is no longer viable because of that disabled import button.
 
Top