Game Development Community

Git for ABSOLUTE dummies

by Lukas Joergensen · in Torque 3D Professional · 07/26/2013 (1:24 pm) · 7 replies

This is the simplest thing I could come up with if non of the VERY easy GIT tutorials really don't help you.
This is not a solution. But it will let you do a single, simple, PullRequest without knowing any git.

Prerequisites:
Installed GIT.
Forked T3D repository.

Doing a PullRequest

Download this package.
Extract the 2 .bat files into your T3D repository folder.

Optional: Setting NotePad++ as your GIT Editor
This is NOT recommended. For some reason it removes the default Notepad++ settings and I don't know how to set them back (it removes tabs, plugins, session etc all the stuff that annoyed me about NPP lol).
  • Drag and drop the NPP exe onto the "setNPPeditor.bat"
  • clan-net.dk/content/images/DragDrop.png

    Creating the branch

    Double click the "beginPRbranch.bat" and type in the branch name:
    clan-net.dk/content/images/branchname.PNG
    This creates a whole bunch of files that gives you different features.
    clan-net.dk/content/images/BranchControl.png

    Change something

    Change the files you need to, here I just add some crap to allProjects.txt
    clan-net.dk/content/images/change.png

    Push it to GitHub

    Now that you've changed something double click "pushTestPR.bat" and write the commit message:
    clan-net.dk/content/images/commitMSG.png

    Do the pullrequest

    Now go into GitHub.com find your T3D repo online, change the branch to your newly created branch. and Click the green PullRequest icon.
    And pullrequest it to the GarageGames branch.
    clan-net.dk/content/images/pullrequest.PNG

    AND for the love of pokemons! DO remember to push it to the development branch and not the master branch or it will get rejected.

    Deleting the branch

    AFTER your pull request is accepted, run the "cleanupX.bat" where X is the name of your branch to delete the branch and reset your master branch.

    Notes:

    THIS IS NOT A SOLUTION. All the GIT stuff for doing a simple PullRequest like this is really simple, and I don't suggest you do this instead of actually learning GitHub, atleast the option to not learn GitHub is out there now.

    THIS IS NOT FOOL PROOF. Follow the exact steps I told you, if something goes wrong, I'm not sure that your repo isn't messed up. You can always try and run the "cleanupX.bat" where X is the name of your branch. If that doesn't work try downloading the repo again... Or learn some simple GitHub commands.

    #1
    07/26/2013 (1:26 pm)
    Btw if someone can improve the bat files, feel free to do so.. I officially MIT license them.

    AND I don't think this is easier than learning GIT I just don't want to hear "I don't know how to GIT" as an excuse not to do a pull request or sharing fixes.
    #2
    07/26/2013 (1:29 pm)
    OH oh again btw have a look at this tutorial by Michael Hall
    Or this one by Daniel Buckmaster instead of using these hideous bat files!
    #3
    07/26/2013 (3:08 pm)
    More recent version of my tut.

    Nice idea with the batch files. And a great touch allowing people to set NPP as their default editor - being dumped right into command-line vim can be a little terrifying!

    My concern is that by hiding git's operation, people won't actually learn to use it, and could very easily screw up their repository in an avoidable way. But, like you said, this is just to get people submitting stuff until they've learned to use an actual git tool. Fair enough!
    #4
    07/26/2013 (6:06 pm)
    What is really required is a huge warning to stay away from the "Git For Windows" interface ...
    ;)
    #5
    07/26/2013 (6:42 pm)
    @Steve oh boy that application have screwed my repo numerous times so I had to reset it completely lol.
    #6
    07/27/2013 (6:44 am)
    Ok, still a self confessed idiot when it comes to using GIT, Although i finally got there with getting mine installed (after working out where the bloody project generator was lol...)

    Ive got Jack Davidson's changes to konrads procedural terrain painter working in my build with a fixed gui that lets you chose the chance of it painting the material, letting you chose how much of a scatter that layer gives. what is the process of getting that added, or am I just better off putting it up as a resource and letting someone that knows properly what they are doing getting it added ? :P or should i just upload my cpp, h and gui file for people ? tho I comment out the undo code as its much faster to use it that way, i can re-enable it easily enough.
    #7
    07/27/2013 (7:14 am)
    Added it as a resource anyway, although its currently in the blogs section ?