• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Git Commands and Visual Studio Code

  • 21
    Posts
    6
    Years
    • Seen Apr 26, 2023
    Guide to Git and VisualStudioCode:

    Opening your folder in VisualStudioCode/Atom is possibly the #1 thing you wanna do before you even start editing your files. With VisualStudioCode/Atom, you can search, edit, merge, stage and unstage code throughout the entire folder all in one program. What does all that mean, ALOT!

    Merging
    When you pull a repo and merge with your's (Like merging Egg's Battle Engine with his Item Expansion), Merging conflicts might occur, (which means the computer can't figure what to do with certain pieces of code. To fix these merge conflicts, you use a text editor (VSC or Atom not Notepad) to see which lines of codes you wish to either replace or keep.

    Staging and Unstaging
    Staging changes are changes in the code that you've made, however, these changes are saved by VSC/Atom called "Changes" in which you have the choices of inspecting the difference between before-n-after files and either having the code completely overwrite the old code or get rid of the new code if it's 4 the best.

    Making a backup
    Through Git, you can make commits, which are basically backups of your files incase you make a mistake in the future. It's best to make a commit after every feature you add into your game.

    Git add * (This command pushes changes to the folder, being saved by Git)
    Git commit -m "put comment here" (This creates and names the commit, you can put a description of what the commits for between the quotation marks.)

    Using Github
    Github is useful in terms of finding functions you want to add to your pokemon game, however, going through each sets of files to find the function specifically once you've found it would be difficult, which is why people use commits. With commits, you can easily look for and see what's been changed for the function to work.

    WARNING ABOUT MERGES!
    DO NOT MERGE YOUR FILES WITH OLD VERSIONS OF A POKE DISASSEMBLY! THERE ARE A LOT OF CHANGES BETWEEN THE TWO SO IT WILL CAUSE MORE PROBLEMS THEN SOLUTIONS! IF YOU WANT TO ADD SOMETHING INTO YOUR GAME FROM AN OLDERVERSION, YOU NEED TO LOOK THROUGH THE COMMITS OF SAID FOLDER AND SEE IF THE FILES SPECIFICALLY EDITED FOR THAT FUNCTION IS UNDER A COMMIT AND GO FROM THERE! A LOT OF POINTERS HAVE BEEN RENAMED FROM OLDER VERSIONS, (FOR EXAMPLE EVENT_OBJ HAS BEEN RENAMED TO OBJ_EVENT)
     
    Back
    Top