<Github_Notes
-
You can merge your work onto the MASTER branch by either
-
Making your own folder calling it Marcus or whatever you want
-
I will have my own Folder Why? --> This is done to simulate the feature of Github known as branches. You don't know how to use branches yet so this is my solution to it that I've used with other people before. Eventually you will learn to create branches and delete them once you push your changes to the master branch.
-
How do I "update" or PUSH my code to github?\
- Git pull
- You always want to pull from the master branch to see what is the latest code before writing your own code that might conflict with other code that is already published on the branches.
- Since we are going to have our own folders this is going to be avoided, unless you go into my folder and mess with my files and code then it will mess up but Github is sophisticated enough to let you know what your code will overwrite and will give you the option to overwrite or delete your changes.
- Git add .
- Git commit -m "ENTER YOUR OWN COMMENT OR DESCRIPTION OF THE CODE YOUR PUSHING"
- Yes you have to put quotations in that exact format with the -m and space
- Git push
-
-
EXTRA:
-
I fucked up and I need to push code but it won't let me
-
Git stash Stash whatever code is conflicting you will have to resolve later or use the extension on VSCode
-
Once you feel comfortable with pushing code and want to make your own repo to practice Github code updating you should look up
- Creating branches for features
- Pushing and merging code to master branch
- Delete branch once it has approved etc.
-
<Additional_notes
- "Can I run C++ and other language in this repo? Yes just use code runner or right click and run code
- Doesn't work well with C and other libraries that require threads or other terminal control that we don't have in VSCode
- Purpose of the repo?
- Save code old, new whatever
-Good for pasting different languages
- Create a new file name it whatever, BUT end it with the correct file type so .py for Python, .c for C .cpp for C++ and it will use the correct syntax highlighting for the language
- Helps seeing other code in another enviorment to help you run multiple codes without having to delete and overwrite the same code im sure you can figure this out by yourself its just another space to debug and run code