Well, in the previous article I’ve shown you ”Install Git on Linux/Ubuntu”, and in this article I want to show you “Create Ruby on Rails project and using Git”. Let’s run through this with me.
Create Ruby on Rails Project
Type command below to create a Rails project:
1
|
|
Initialize Git
Type command below to initialize git:
1 2 |
|
Ignore File/Dir
Git uses file .gitignore
to determine which files and directories to ignore, before you make a commit.
.gitignore
file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
Type command below to create a .gitignore
file:
1
|
|
Then type file/dir or content that you want git to ignore:
1 2 3 4 5 6 |
|
Type command below to add Rails project into git:
1
|
|
Type command below to commit into git:
1
|
|
And type command below to push to the repository branch master:
1
|
|