• 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.

Question - IDE Source Control - Create, Import or Clone Repository? Confused...

J

JapanGamer29

Guest
Hi all, I've been using BitBucket and committing my changes to it without problem. However, after upgrading to GMS 2.3 and converting my project, it's no longer connected to BitBucket.

So, my info in Preferences -> Plugins - > Source Control is complete, and I have the choice of Create, Import or Clone Repository. I don't understand what to do since I don't want to create a new repo, nor import anything, nor clone anything. I'd just like to commit my latest changes to my existing BitBucket for my current project. Can you see why I'm confused?

Cheers.
 

rIKmAN

Member
Just create a new repo, that way you have seperate v2.2.5 and v.2.3.x repo should you need to go back for any reason as once you upgrade a 2.2.5 project to 2.3 you can't go back, so 2 seperate repos would make sense for ease of use instead of having to checkout different versions etc from the same repo. Just use the one that relates to the version you need, keeps it super simple and takes 2 mins to setup.

Also someone tried to merge a converted 2.3 project into an existing 2.2.5 repo and it didn't sound like it went too well, though I'm not sure if it was user error or just the fact they tried to merge 2 completely different project structures together as the details of what they did were unclear - other than they pushed a 2.3 project into a 2.2.5 repo.

 
Last edited:

FrostyCat

Redemption Seeker
Also someone tried to merge a converted 2.3 project into an existing 2.2.5 repo and it didn't sound like it went too well, though I'm not sure if it was user error or just the fact they tried to merge 2 completely different project structures together as the details of what they did were unclear - other than they pushed a 2.3 project into a 2.2.5 repo.
It went south because he is unskilled at Git and made all sorts of bad moves. Random resets here, uninformed merges there, just taking advice from what is effectively arbitrary hearsay. It is no surprise that his repository is now in disarray, and if any git push --force got involved, likely unsalvageable.

Just a little bit of common sense in branch use would have made this a trivial port. By backing up the 2.2 original in its own side branch and using master to convert forward, not only have I NOT lost any work in the GMS 2.3 transition, but all my projects now have a one-command toggle between the 2.2 original and 2.3 conversion.

Let the old project be OLDPROJ and the new converted project be NEWPROJ. Also assume that the old project is clean and at parity with remote master, and the new converted project isn't hooked up to Git yet.
  1. In the existing project, branch the existing master to master-2.2, then return to master
    Code:
    cd OLDPROJ
    git checkout -b master-2.2
    git push --set-upstream origin master-2.2
    git checkout master
  2. Copy the .git directory from the existing project to the converted project
    • Windows: robocopy OLDPROJ\.git NEWPROJ\.git /s /e
    • Mac: cp -R OLDPROJ/.git NEWPROJ/.git
  3. In the converted project, add all the files and delete all files that have disappeared post-conversion (e.g. views files), then commit and push to master.
    Code:
    cd NEWPROJ
    git add -u
    git add .
    git commit -m "Initial 2.3 commit"
    git push
Now master would have the 2.3 project and master-2.2 would have the original 2.2 project.
 

rIKmAN

Member
@FrostyCat Yeah I wasn't sure what had happened with that issue, the OP didn't seem to know either and details were quite ambiguous.

However you know as well as I do that what you just said will be like a foreign language to the majority of users here who are also unskilled / inexperienced with Git - hence my advice to just make a new repo and keep it as simple as possible with less places for things to possibly go wrong.

A lot of people using source control on here are doing so by the seat of their pants, not really understanding what they are doing because they’ve been advised to use something more complicated after somehow messing up simple manual backups or actually deleting things from projects themselves - so I think keeping what they have to do with Git to a minimum is probably best in most cases.

That's not specifically aimed at you OP, just in general from reading threads where people struggle to even set source control up even though there are multiple tutorials on using external tools and a dedicated section in the manual showing how to use and setup the built in source control.
 
J

JapanGamer29

Guest
Just create a new repo, that way you have seperate v2.2.5 and v.2.3.x repo should you need to go back for any reason as once you upgrade a 2.2.5 project to 2.3 you can't go back, so 2 seperate repos would make sense for ease of use instead of having to checkout different versions etc from the same repo. Just use the one that relates to the version you need, keeps it super simple and takes 2 mins to setup.
I'm happy to keep it simple, but I find the terminology confusing. Like, when you say, "create a new repo", do you mean in GameMaker or on BitBucket?

I did the "Create New Repository" in GMS2.3 and committed my latest changes. The next step is to push them to BitBucket, but I only have the "Clone Repository" option available. Are you saying I should create a new repository on BitBucket, put the new url in Preferences->Plugins->Source Control, and the "Push Changes" option will then become available?
 

rIKmAN

Member
Yeah, to keep things simple and avoid having to do anything more advanced that you wouldn’t be comfortable with I’d just setup a new repo on Bitbucket and use that for the 2.3 project.

If you ever need to go back to the 2.2.5 project it’s safe in a separate repo and not at risk from being lost/damaged by any accidental mishaps trying to use the same repo for both versions.

I can’t remember the steps for setting up and using the built in source control as I use Git Bash, but there is a tutorial in the manual that should walk you through entering details etc from the new repo you create in BitBucket.

Make sure you have “normal” zip/rar backups first as a last resort in case something goes wrong somehow while you are trying to set things up. It’s unlikely but better safe than sorry.
 
J

JapanGamer29

Guest
Alright, great. It's all set up now, thanks!

Steps I took to make a clean start:
- Create a new repository on BitBucket (e.g. "myproject_gms2.3")
- In GMS, add url* in Preferences -> Plugins -> Source Control
- From the Source Control tab, choose "Import Repository"
- Enter BitBucket url*
- When complete, look on BitBucket to see if your code has been uploaded
- Under GMS Source Control tab, if "Push Changes" is still gray, re-open your GM project

* the BitBucket url is the one that starts with "https" and ends with ".git"
 
Top