Getting Started with Git (Windows)
These instructions are for getting started quickly on a Windows PC. I’ve used XP, but you shouldn’t find *too* many differences if you’re using Vista (please comment below with any changes you notice!).
Start by going to the downloads page on the git website. Click on the “msysgit” link (it’s better than the old cygwin implementation). You’ll find install instructions, click on the download link and select the executable installer. Run the exe and when you get to the “Path” screen, select “Use Git Bash only”. On CR/LF behavior, select the “Use Unix Style Line Endings”.
Once the install is completed, created a test directory in Windows explorer. Right click on the directory and select “Git Bash here”. This will create you a terminal window for executing git commands. Go back to windows explorer and create a test file – say test.txt. Then go into the terminal window and type “git init” to create a repo. Then type “git status” and you’ll see test.txt is untracked. “git add .” will add all files (right now, test.txt) to the staging area. “git status” to see that. Then “git commit -m ‘initial commit'” to commit test.txt. Now “git status” and you’ll see that the working directory is clean. “git log” and you’ll see there has been an initial commit. “gitk” and you’ll get a visual tool for viewing/browsing the repository and it’s history. That is it – you’re up and running with git!