blog.robotex.de

Git: How to start a new rails project and put it on GitHub

Create a new Rails project:

$> rails new <project_name>

Put your rails project under local version control:

$> cd 
$> git init .

Edit the .gitignore file:

.bundle
db/*.sqlite3
log/*.log
tmp/**/*
doc/api
doc/app
*.swp
*~
.project
webrat.log

Commit:

$> git add .
$> git commit -am "Initial commit"

Go to GitHub and create a new project

Add your github master:

$> git remote add origin git@github.com:<your_github_username>/<project_name>.git
$> git push -u origin master

That's it!

After that, a regular commit looks like that:

$> git add .
$> git commit -am "Your commit message"

Pushing to GitHub:

$> git push

Back