Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are pre-requisites for learning & understanding Git?

I know bits and pieces of PHP and JavaScript (besides HTML & CSS) — just enough to fork existing plugins for scripts like blogs (Wordpress), forums (Vanilla Forums), etc. And I am a Windows user.

I want to understand / learn Git so that I can use GitHub, or any other service like that effectively. So, what are the pre-requisites for learning Git?

(PS: I am asking this because it looks like Git requires some Linux knowledge, alongside some BASH and SSH.)

like image 920
its_me Avatar asked Dec 13 '25 01:12

its_me


2 Answers

I use Git on both Linux and Windows. Under both of those environments, I use its command-line interface exclusively. When installing on Windows you have the option to install it such that it will only work under a bash shell that runs in a window of its own, or to have the commands also exported into the standard Windows console environment as well. When I use it on my windows platform I use both the bash console it installs and the windows console; whichever happens to be more convenient at the moment.

Git doesn't require much Linux knowledge, except that some commands are sort of Linuxy (my own word) in their nature. For example, "git rm filename" to remove a file from both your system and from the repository. 'rm' is the Linux version of what Windows/DOS would call 'del'. So there are a few of these sorts of idioms you'll have to get used to. But they don't really contribute much to the overall learning curve.

I saw that someone mentioned that nobody knows all of Git by heart. That's probably true. But within a few days of getting started with it, you'll find yourself able to do most of the 'everyday' stuff without reading documentation. And when you get to one of those less commonly used commands, or when you need some command switch that is difficult to remember the documentation is only a few keystrokes away.

There is a book available free online: Pro Git. It's great. Well worth the time investment to read it. I also happen to like Version Control with Git (O'Reilly&Assoc). If you really want to learn Git inside and out, read those two books in that order. Additionally, every git command has a help page associated with it that you access by appending --help to the command. Example: git checkout --help will bring up the help page for that command.

If you're serious about programming nowadays, version control is a tool you can ill-afford to ignore. Git is the current coolest kid in the school. You'll be glad you invested the time in learning to use it.

like image 88
DavidO Avatar answered Dec 14 '25 14:12

DavidO


Check this tutorial out to learn the basics. And don't be afraid of bash, Linux or anything. Yes, you will have to use console, but it's not scary at all. At first, you won't need much besides the cd, ls, mkdir, rm and of course git commands.

Install git for Windows from here: http://code.google.com/p/msysgit/

And don't use GUI (Tortoise) for a while, to get used to console. Later you might want to use it for logs, diffs or something, but first you better understand what's behind all those fancy menus and buttons.

like image 30
dmedvinsky Avatar answered Dec 14 '25 16:12

dmedvinsky