Please do not clone this repository directly. Fork it and git clone the forked copy. Look up how to fork a repo.
For mac, we use Terminal. For windows, you need to install cygwin. (http://www.mcclean-cooper.com/valentino/cygwin_install/)
DO NOT NOT NOT EXECUTE ANY COMMAND THAT LOOKS LIKE THIS: rm -rf *.THIS WILL FORCEFULLY DELETE EVERYTHING ON YOUR COMPUTER. DON'T DO IT. PROCEED WITH CAUTION WHEN YOU SEE SOMETHING LIKE THIS.
I'll list some here that you will probably need to know:
lslets you see the contents in the current directoryls -lahlists the contents in the current directory with file permissions and more information.cd <directory-name>goes into a directorycd ..goes back one directorycd ../directory-1/directory-2goes back one directory, then goes into the directory-1 folder and then directory-2. Can mix n' match.cdgoes to root (the top parent folder)pwdshows you the complete path to your current directory (useful when you've lost track where you are)
Anything else you don't know how to do, just look it up.
WHEN WORKING ON THE KENTORII.COM REPO OR THE GAMEDEV REPO, MAKE SURE YOU PUSH A BRANCH THAT IS NOT DEVELOP OR MASTER. MAKE A NEW BRANCH that branches off of develop AND WORK/PUSH ON THAT. IT'S OK TO PUSH TO MASTER FOR THIS REPO THOUGH. IT'S MERELY A TEST REPO FOR LEARNING
git clone <repo-link> clones the remote repository to your local computer. Look up how to clone github repo.
git status to see any changed files.
git add files that are ready to be committed.
git commit -m 'your description of the changes here' or go through git commit
Your "added" files are now "packaged" and ready to be "pushed" onto the remote(online) repository.
git push will push your commited files onto the online repo.
git push <remote-name-url> <branch-name> for advanced push.
What is really the online repo that we are pushing to? By default it should be the url that you used to git clone this repo onto your local computer. So if you forked the original repo into your own github account and then git cloned the forked version, then you're pushing probably to the forked version and not the original, which is fine.
We can see what repos we are keeping track of in our current repo. Go to testandplayrepo folder on your local computer and type
git remote -v. This lists all of the remote points we are pointing to.
Above, you can see that the url that has the text : (push), was the url you probably used to clone the repo. Whenever you do push or fetch, your local repository uses these urls to know where to push or fetch from.
But what if we want to make sure our forked repo is updated with the original repo's code? In other words, we want to make sure we are working off of a copy of the code that is up-to-date.
Lets' add a remote link to the original repo using git remote add <remote-name> <remote-url>
And then check we are good to go with git remote -v again.
We can now git fetch <remote-name> the changes from the original repo. We now have the fetched changes floating in space somewhere on our computer, but our files are not actually changed yet. git merge <remote-name>\/<remote-branch> to merge the fetched data from the remote repo's fetched data and the corresponding remote branch we are merging FROM. The changes are merged onto our current branch.
Above, there weren't any changes in the ntorii original repo, so there was nothing changed.
To check which branch we are currently working on, run git branch. Whatever has the star and green text beside it, is the branch we are currently working on.
To add a new branch, use git branch <new-branch-name>. To switch to that new branch, do git checkout <branch-name>.
Now let's go back to the concept of git push. Since we are now dealing with more than 1 remote point (origin and ogorigin) and we have multiple branches on our local environment and on the online repo, we need to be careful about what git push is pushing, and where it is pushing it.
For a more descriptive push, we use git push <remote-name-url> <branch-name>.
Here, I'm explictly saying that I want to push to my forked repo and I'm pushing the contents of my current branch which is new-branch.
Check the actual contents on github.com to make sure the changes were pushed.
Final notes:
- If you don't know how to do something, look it up. If you're scared, just ask.
- Are you getting annoyed with the friken type username and password stuff you gotta do everytime you push? Then look up how to setup ssh key with your github repo.
https://stackoverflow.com/questions/8588768/git-push-username-password-how-to-avoid
Forkthis repository to create a copy on your github account.git cloneyour forked repo into your terminal- Use
git remote -vto check your remote points. You should have the url of your forked copy, not the original of ntorii. - Do anything you want at this point.
- Learn by doing.
- Learn how to make changes and commit to main repo.
- Learn how to setup ssh key.
- Setup 2-factor authentication on github account.









