Help With GitHub

I'm just starting out with GitHub. I've Googled a bunch of different terms but nothing answered my question. Yesterday I got my project up on my repository. So I've updated my project and want to update the repository. My question is do I just do the same thing I did when I initially uploaded it? I mean there's no different files or anything. All the updates are within files already on the repo. Another question is, how do I look at the old code after I've updated? Or how do I find which update I want to go back to if I accidentally screw it up? This may be unclear. If so just ask and I will try to clarify. Thanks!
Last edited on
My question is do I just do the same thing I did when I initially uploaded it?


To update your code in the online repo you need to follow these steps.

1. Add the files you made changes in to the staging area. https://www.atlassian.com/git/tutorials/saving-changes/git-add
2. Commit those changes to your local version. https://www.atlassian.com/git/tutorials/saving-changes/git-commit
3. Push the changes to your online repo. https://www.atlassian.com/git/tutorials/syncing/git-push

So basically Add->Commit->Push. All Git tutorials out there should show how to do this. I would also recommend if you are new to Git try and get the hang of it first by using GUI client which simplifies things a bit and gives you graphical cues as to what is changes and what the commands do. If you are on Mac or Windows I would recommend SourceTree http://www.sourcetreeapp.com/ which is a great Git client.

Here is a good tutorial that I used also to learn Git https://www.atlassian.com/git/tutorials/
Last edited on
Does this work even if there are no new files, only changes to the already present files?
Yup
Topic archived. No new replies allowed.