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?
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/
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?
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
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.