I am just getting my feet wet with Git and am looking for tutorials for beginners.

I am reading through the book, "Version Control with Git" by Jon Loeliger and Matthew McCullough, but am not finding it suitable for a Git virgin. It is written as if the reader is already familiar with Git and wants more in-depth information. Not much out there (in terms of paper and ink books.)

I will be doing my own searches, but would still appreciate recommendations from Daniweb members.
Any online books or tutorials you have found particularly suitable for a complete Git newbie?

Recommended Answers

All 10 Replies

I've always found the Pro Git book, freely available online here, to be very helpful and definitely good for beginners.

The thing with Git is that you'll eventually get an epiphany and it'll all become clear. It's mainly about understanding how diffs, commits and branches work together.

One thing though is that most tutorials on Git will at least assume that you are already familiar with some other version control system, like cvs, svn, mercurial, bazaar, etc.. So, that might be a bigger problem if you are not already familiar with any of those. If you lack the high-level conceptual understand of how you use version control and the general day-to-day work-flows with them.

I have a copy of 'version control with git' too. I also have 'pragmatic version control using git' by Travis Swicegood.

Both are extremely good references for learning to use git.

I like both books but IMHO, the 'pragmatic....' book is written in a more beginner friendly way. So you might get on better with the pragmatic book, it's almost certainly worth a look. Both books cover pretty much identical material. The Loeliger/McCullough book just presents things slightly differently!

EDIT: The book recommended by Mike(above) is also really good! I downloaded the ebook version of it a while ago. Forgot I had that one!

Hi, guys.

I am back with some related questions.

I seem to be okay working with GIT locally. Now I'd like to also host projects on GitHub. Taking baby steps, I am experimenting with a small piece of code I posted earlier here on DaniWeb (a sub-routine for a quadratic equation solver.)

The C++ source code file has been commited locally:

git init
git add
git commit

A repository on GitHub has been created:

https://github.com/dcb2015/Quadratic-Equation-Solver.git

GIT confirms recognition of this repository when I run 'git remote -v'.

I then run the 'git push' command, and enter my username and password.
However, I keep getting the "Invalid username or password." message.
See the attached screenshot.

I have tried this several times. I am entering the username and password assigned to my GitHub account.

I don't know what else to try and am getting frustrated.

What am I missing?

I don't know what your issue is. I have always used SSH. I think you should consider switching to that.

Hi, Mike.

The issue was that my connection log-in was being denied so I couldn't push my project up to GitHub.
But no worries; I got it figured out. I had set up my account for two-factor authentication, which couldn't work the way I was doing it. When two-factor authentication is used, users must create a token and can then set up caching to avoid repeatedly entering log-in info.

Or they can use SSH, as you suggested.

Another question:
In GitHub I see some users have marked their repositories with tags to identify the language the project is written in. For example, C++, PHP, JavaScript, etc. I haven't found a setting for doing that, but would like to identify my repositories as being in C++. How is this done?

I have no idea what you are talking about with those "tags to identify the language"... do you have an example of a repo that is tagged like that... I can't remember noticing that anywhere.

Hi, Mike.

"I have no idea what you are talking about . . ."

I was exploring GitHub, to see what is up there and, as an example, did a search for "Discrete Fourier Transform". See the attached screenshot for a portion of the result page that was returned.

Beside all the results is an indication of what language the project is written in: Python, C#, M, C++, Clojure, Ruby, C, MATLAB, Lua, Rust, etc.

And along the left side of the page (but not included on the attached screen capture), users can filter the results by language (i.e. - clicking on the "JavaScript" link filters the list to show only the projects written in JavaScript).

I had assumed GitHub users specified what language their project was written in so that other users could apply the filters and find projects in a language they were seeking. I wanted to tag my project as a C++ project so that people looking for C++ source code could find it. Hence my question.

However, after further exploration, I have come to the realization that GitHub detects the language automatically, because I see my project listed among the C++ results even though I didn't tag it or explicitly name its language in any way.

Hmmnn ... learned something new today.

Member Avatar for iamthwee

Everyone advocates learning command line stuff first which is useful as it tells you what is happening in the background, after that install a github GUI client. They should be one for your choice of operating system.

Then you simply commit all the changes you make locally online with one simple click.

I don't think that github has any GUI client. There are GUIs for using Git, though.

I have always just used command-line tools for version control (git, svn, etc.). I never understood the need for GUIs for that. And I always find it annoying when GUIs constantly attempt to "dumb things down" by assuming some sort of default behaviour that is probably not what you want or should be doing in real-world situations. For instance, I would assume that any Git GUI would default to the "master" branch all the time, which is fine for toy examples, but nobody works on the master branch by default on real projects (you try features out and stabilize them in a separate branch before you merge it into master).

However, I've grown to love Github's website for the way it presents and interconnects things like forks, commits, issues and pull requests. It's one of the few GUIs for development that I find to be very productive and streamlined. I just wished that some of the C++ dinosaurs at LLVM/Clang and Boost would be more willing to switch to it or use it more.

Member Avatar for iamthwee

I don't think that github has any GUI client. There are GUIs for using Git, though.

Thanks for the correction. Can't say I've ever done any large projects using github, well, I'm currently working on ignitedcms

https://github.com/ignitedcms/ignitedcms

which is pretty big, and the git client for mac is just superb. But like I said, I probably use it in a backward retarded way, where I push the entire project after a few amends.

I probably wouldn't use the command line again, but as they say, different strokes for different folks and all that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.