Difference between revisions of "Git"

From Ittichai Chammavanijakul's Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
* Download Installer and run it.
 
* Download Installer and run it.
 
* Choose all default settings (for now).
 
* Choose all default settings (for now).
 +
 +
== Repository ==
 +
Launch Git Gui
 +
 +
Create New Repository
 +
 +
Specify path
 +
 +
== Syntaxes ==
 +
* Cretae an alias for check out
 +
<pre>
 +
$ git config --global alias.co checkout
 +
</pre>
 +
 +
* Set the default editor
 +
<pre>
 +
$ git config --global core.editor notepad++.exe
 +
</pre>
 +
 +
* First time setup for application
 +
 +
<pre>
 +
$ cd first_app
 +
$ git init
 +
Initialized empty Git repository in ../Rails_Projects/first_app/.git/
 +
 +
</pre>
 +
 +
* Add the ignore list
 +
<pre>
 +
$ cd first_app
 +
$ vi .gitignore
 +
$ cat .gitignore
 +
.bundle
 +
db/*.sqlite3*
 +
log/*.log
 +
*.log
 +
/tmp/
 +
doc/
 +
*.swp
 +
*~
 +
.project
 +
.DS_Store
 +
 +
</pre>

Revision as of 17:49, 30 January 2012

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

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

Repository

Launch Git Gui

Create New Repository

Specify path

Syntaxes

  • Cretae an alias for check out
$ git config --global alias.co checkout
  • Set the default editor
$ git config --global core.editor notepad++.exe
  • First time setup for application
$ cd first_app
$ git init
Initialized empty Git repository in ../Rails_Projects/first_app/.git/

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