Getting started with Git
Best Resources:
Git Book from GitHub Book starts explaining version control, then install, then config and continues as git is used locally, to branches, to uploading to gitHub, and beyond to collabrating.
Git Docs
Getting git0) Check if git already installed?
From cmd line: git --version to see if installed
From cmd line: git --version to see if installed
Installed? Skip to 2)
1) (Ch.1.5)Install Git - by going to Git docs or online book and follow directions for your O/S.
2) (Ch.1.6) First-Time Git Setup using git config set your name, email, and optionally editor and more.
Basic git config settings:
Identity
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
Editor
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
(lab1.3) End of Line Preferences
git config --global core.autocrlf true
git config --global core.safecrlf true
Check your settings:
git config --list --show-origin
--list will list all settings
--show-origin will show location of the settings
3) (Ch.1.7) HELP!
git help <verb>
git <verb> --help
man git-<verb>
4) (ch2.1) git Command basics
Can be done from command line or via a GUI Clients
Even when using GUI Clients you need to know what the basic commands are and work flow is:
- Create a git repository by 1) changing into the directory and 2) enter git init
- Add files to this repository git add <file name(s)>
- Edit the files - normal editing
- Commit the changes to the repository git commit -m <commit msg>
5) repository
git status
Besides giving status of a directory, you can use to test if a directory is a git repository.
Next more on local repository management.
Comments
Post a Comment