GameMaker Using Source Control In GMS 2

Aaron Craig

Member
GM Version: Studio 2
Target Platform: Windows
Download: N/A
Links:
Get Git -- https://git-scm.com/
Create an account at bitbucket -- https://bitbucket.org/

Summary:
I go over setting up Source Control inside of GameMaker Studio 2. I cover why to use it, what you need to download, how to get it all installed, all the git commands necessary, and how to create branches for testing and other purposes.

Tutorial:
 
Last edited by a moderator:

Dog Slobber

Member
I want to thank you for this.

I have never used source control, I followed your tutorial and everything worked out terrific. I had to make a few adjustments because of differences between MacOS and Windows but nothing I couldn't figure out.

Thank you!
 
I've never known why I needed to wrap my head around source control until just now when I watched your tutorial.
Got the repo set up and I feel so much safer now.
Thanks a bunch!!!
 
D

DarklinkFighter

Guest
New
I've never known why I needed to wrap my head around source control until just now when I watched your tutorial.
Got the repo set up and I feel so much safer now.
It's not just saver... It is also increadible useful for teamwork with a lot of people (as long as you teach the team how to use Git properly as it is quite hard to get into - especially for game development as you have to deal with binary files (for example images) which git does not handle very well)
You can design whole team workflows with it though to minimize the "conflict" potential...

There are also other Git Hosting Plattform which are increadible powerful for Project Management Reasons as well!
GitLab.com for example has TONS and TONS of free features (Project Management, Workflows, External Tool Integration, Build and Release Automation) and is also free for private closed sourced code.
But if you want to make an open source game for example you will get ALL GitLab Features for free for that project.

In git you work with "branches" to ensure that things which currently work are likely to work continously.

So you could setup branchflows like:
  • master // Release Branch which will contain only stable versions of the game
    • develop // Base branch for stuff which is currently in development...
      • feature_xyz // Here some people can develop new features or do refactorings without getting disturbed by other peoples current work
      • develop_art (optional but useful) // Here artists can modify graphics in batches so that the binary conflicts will most likely only occure here and to make sure that binary conflicts are resolved correctly and then merge back into 'develop'
  • hotfix // Synchs often with 'master', fixes stuff there and the fix will get merged back into 'master'

This is one possible example but there are many other workflows as well... Each team has to find out how they will work together most efficiently.
But each option requires the team to learn to communicate even more which is actually a good thing :)
 
Last edited by a moderator:

hans

Member
I mean no offence Aaron, but, I've gone over your tutorial for hours (8 to be exact) and it has sadly never worked. :(
 

Aaron Craig

Member
I mean no offence Aaron, but, I've gone over your tutorial for hours (8 to be exact) and it has sadly never worked. :(
Sorry to hear that.
I've got an updated version that just uses source control and doesn't rely on anything from GameMaker, and it's a much easier to follow and more likely to work for you. Check out my channel and just search source control.
 

Mack SIm

Member
Doesn't work for me either :(

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/UserName/repositoryname.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
 

Mack SIm

Member
Doesn't work for me either :(

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/UserName/repositoryname.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I'm totally newbie about using GIT but it seems I found some hackie way how to fix it...
1. Create some folder where you will store your repos.
2. Run in this folder in command line "git clone https://UserName/@bitbucket.org/UserName//RepoName.git", but replace by your URL. This command will create a new folder with name "RepoName". Important: there should not be a folder with such name.
3. Make a copy of your GM project and save is in the folder"RepoName" (use File -> Save Project As)
4. Commit your project via GM - Source Control -> Commit Changes
Also I don't now why but when I tried to do in GM - Source Control -> Push Changes it said that password for repo is wrong. After first push via command line - "git push" it started working via GM though.
Hope this will help somebody...
 
Top