Git

Git
Git is an open-source, distributed version control repository system.

http://git-scm.com/

Installing Git
http://progit.org/book/ch1-4.html

Installing Git on Windows

 * http://code.google.com/p/msysgit
 * https://github.com/msysgit/msysgit/wiki/InstallMSysGit
 * http://code.google.com/p/msysgit/downloads/list


 * Download Installer and run it.
 * Choose all default settings (for now).

Repository
Launch Git Gui.

Create New Repository.b

Specify path.

Syntaxes
$ git config --global alias.co checkout
 * Cretae an alias for check out.

$ git config --global core.editor notepad++.exe
 * Set the default editor.


 * Initialize git for the first time.

$ cd first_app $ git init Initialized empty Git repository in ../Rails_Projects/first_app/.git/

$ cd first_app $ vi .gitignore $ cat .gitignore .bundle db/*.sqlite3* log/*.log /tmp/ doc/ .project .DS_Store
 * Add the ignore list.
 * .log
 * .swp

$ git add. . = Current directory
 * Add all

$ git status
 * Check status

$ git commit -m "Initial Commit" -m = Message git commit = Local commit git push = Sync up with remote repository
 * Commit

$ git log commit 217d58e0f073e9249cca5ae1e05322340abd5034 Author: Chris Date:  Mon Jan 30 17:05:03 2012 -0600
 * View log

Initial Commit

~/Documents/Rails_Projects/first_app (master)

$ rm -rf *.rb
 * Restore the deleted file

$ git status no changes added to commit (use "git add" and/or "git commit -a")
 * 1) On branch master
 * 2) Changes not staged for commit:
 * 3)   (use "git add/rm ..." to update what will be committed)
 * 4)   (use "git checkout -- ..." to discard changes in working directory)
 * 5)       deleted:    application_controller.rb
 * 1)       deleted:    application_controller.rb

$ git co -f

$ ls 03/01/2012 02:37 PM                80 application_controller.rb

Github
Coming soon