Recommended GIT Guides for Beginners?

After being a hobby coder for several years, a few people recommended that I check out GIT. So I downloaded it and am anxious to start trying it out.

However, I am not finding it very intuitive. Can anybody recommend a good reference for brand-new users?

Is it simply a matter of navigating to the appropriate folder and doing a "commit"?

At the moment, I am only planning to use it to back up the C++ source code for projects on which I work--not the entire project. How do I tell GIT to back up only the .cpp file?

1) Create a git repository (git init)
2) Stage files (git add)
3) Commit files (git commit)
4) Push files (git push)
5) Repeat steps 2 through 4.

That simple.
If you prefer an interactive learning experience try https://try.github.io/levels/1/challenges/1 along with others out there.

Otherwise if you want a more standard approach with simple tutorials on different parts of using git I would highly recommend Atlassian tutorials which can be found here https://www.atlassian.com/git/tutorials/

Also if you are on Windows or Mac be sure to check out there GUI program for Git which makes the process of learning and using Git much easier in my opinion (There is good alternatives out there for *nix also) http://www.sourcetreeapp.com/
Aside from try.github.io, there is also https://pcottle.github.com/learnGitBranching/?demo
Last edited on
Thanks for all the feedback. I think I have got it working on my local computer.

I would now like to take the next step and host work on GitHub. I have worked through a few tutorials found online but still am not able to push a project on to GitHub.

Here's what I have done so far (locally):

git init
git add
git commit

So far, so good.

I signed up for an account on GitHub and can confirm a connection via SSH.

A couple questions come to mind right away:

Do I have to authenticate before pushing a project to GitHub?

Do I have to be in a GIT folder when I authenticate with GitHub?
When I first start the GIT Bash, the default start up folder is not one of the GIT project folders. So should I navigate to the appropriate GIT project folder before authenticating with GitHub?

In any case, once I authenticate, I run the 'git push' command, am prompted for my user name and password, which I enter, but keep getting an "invalid username/password" error. I have tried many times and cannot successfully run the git push command.

Any suggestions as to what I might be doing wrong?

Last edited on
If you're on Windows or Mac, try out the desktop applications:
https://windows.github.com/
https://mac.github.com/
Also, http://git-scm.com/book/en/v2

That link should probably be your go-to resource for git.

Do I have to authenticate before pushing a project to GitHub?
Every time you push to a repository on GitHub, you have to authenticate (unless you generate SSH keys). If you pull from a private repository, you will also have to authenticate. I now see what your confusion is

Just to clarify, you created the repository on your local machine, and now you want to push this new repository to GitHub?
Follow this guide: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

Basically, you just need to create a blank repository on GitHub, add a remote pointing to this new repository, then you will be able to push your local repository out to GitHub.
Topic archived. No new replies allowed.