That was all Greek. I just followed the instructions on the page. It would be so much easier to just keep uploading the files. I want to use GIT, but I CANNOT FIGURE IT OUT!
I really hate technology today. Hate it. GIT sucks. Networking sucks. Plex's media scraper sucks. Technology sucks.
My Adventure Game Engine - Making Way For Adventure Engine 2
Re: My Adventure Game Engine - GIT is hard. Need help please
Here is an illustrated git guide for Windows users. You can probably find it useful even if you don't use Windows. It's also relevant to your github-by interests.
http://nathanj.github.com/gitguide/tour.html
http://nathanj.github.com/gitguide/tour.html
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
Now, have you set up a passphrase and SSH key? If so, have you added it to your GitHub account? If not, you only have the instructions in the section “Mac OSX Keychain” (you're running Mac OS X, right?)Jasoco wrote:That was all Greek. I just followed the instructions on the page.
Oh, and if you feel you might screw up your repository some time, it's a good idea to back up your project. I know I did. It certainly helped enabling me to experiment. On the bright side, Git hardly ever deletes history, you have to jump through quite a few hoops to make it do that.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
I added the key to GITHub and everything was going fine until I tried to actually commit stuff.. Whatever the fuck that means. Upload? I dunno. Because it won't upload the files from my HD to GIT. That is the problem. How hard is it to create a working GUI that takes care of it for you? Even GitX.app doesn't work right. I don't get it! I don't get it! I don't git it!
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
Commit means you add the changes you've made to your local repo. Push means to push the changes you have commited to the central repo.Jasoco wrote:I added the key to GITHub and everything was going fine until I tried to actually commit stuff.. Whatever the fuck that means. Upload? I dunno. Because it won't upload the files from my HD to GIT. That is the problem. How hard is it to create a working GUI that takes care of it for you? Even GitX.app doesn't work right. I don't get it! I don't get it! I don't git it!
Once you have your ssh keys set up, you need to add some settings to git so that github will know who you are:
Code: Select all
git config --global user.name "mygithubusername"
git config --global user.email theemailIuse@github.com
Code: Select all
cd ~/project-directory
git init //this only needs to be done once when you're setting up the project
touch README //this only needs to be done once when you're setting up the project
git add * //Choose specifically which files and folders you want to add. Right now we're adding everything.
git commit -m "Initialized my repository and added all the stuff I've done so far."
git remote add origin git@github.com:mygithubusername/project-name.git //this only needs to be done once when you're setting up the project
git push origin master //when you've pushed once, it'll remember where to push to. So you only need to run "git push".
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
Like nevon said. Commits are not like uploads, they are like check points, so you want a lot of them. Especially if you give them descriptive messages, it will prevent maintenance nightmare in the future: you can find out for every piece of code exactly when you wrote it and why you did it that way.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
Hang on.. I followed Nevon's step-by-step and something seems to be working... please hold...
Edit: Holy shiz. Go here!
http://github.com/Jasoco/LOVE-Adventure-Game-Engine
It worked! Nevon, you're amazing. Thanks to your perfect instructions I got it working! You can now download the project, even in its current state, which is pretty buggy, but there's some cool stuff to look at. I will post some new features later.
Edit: How do I update again? I changed the README to add some text, and did "git push" but it didn't upload. And if I try "git push *" it says "error: failed to push some refs to 'README'". What's happening?
Edit: Holy shiz. Go here!
http://github.com/Jasoco/LOVE-Adventure-Game-Engine
It worked! Nevon, you're amazing. Thanks to your perfect instructions I got it working! You can now download the project, even in its current state, which is pretty buggy, but there's some cool stuff to look at. I will post some new features later.
Edit: How do I update again? I changed the README to add some text, and did "git push" but it didn't upload. And if I try "git push *" it says "error: failed to push some refs to 'README'". What's happening?
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
Before "uploading again", you have to do a couple things:
Remember that you can see the status of your current commit (i.e. files included/not included on the commit, etc) at any time by doing git status
It becomes second nature in 1 week.
- Add the files you have modified to the "commit". For example you could do git add README. However the most common way to do this is by doing git add . (notice the dot). This will add all the modified files to the dir.
- If you have renamed or erased any file, you must add the new one and remove the old one. Removing is done with git rm path-to-file. For folders is git rm -rf path-to-folder.
- Once you have added/removed all the files you want for this commit, you have to actually make the commit. That is done with git commit -m 'message'. 'Message' is just some text for us humans. For example "Updated README".
Remember that you can see the status of your current commit (i.e. files included/not included on the commit, etc) at any time by doing git status
It becomes second nature in 1 week.
When I write def I mean function.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: My Adventure Game Engine - GIT is hard. Need help please
To update your repo, you need to do three things:Jasoco wrote:It worked! Nevon, you're amazing. Thanks to your perfect instructions I got it working! You can now download the project, even in its current state, which is pretty buggy, but there's some cool stuff to look at. I will post some new features later.
Edit: How do I update again? I changed the README to add some text, and did "git push" but it didn't upload. And if I try "git push *" it says "error: failed to push some refs to 'README'". What's happening?
1. Add the changes that you want to commit.
Git needs to know what files you want to add to your "checkpoint". Because maybe you've done changes to several files (you can see which have been changed using git status), but you don't want to add all of them.
Code: Select all
git add file1.png file2.lua filethree.sh //adds these three files
git add gfx/* //adds every changed or new file in the gfx directory (including subdirectories)
git rm badfile.py //If you want to remove a file that is no longer needed
git mv file_in_wrong_place.png gfx/file_in_right_place.png //Move a file into a subdirectory
Now you need to actually commit those files. AKA update your local repo.
Code: Select all
git commit -m "Meaningful message that describes what you've done"
Now all you have to do is send all the changes you've made to your local repo, to your central repo (github, in this case).
Code: Select all
git push
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests