Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kengoudsward/625576 to your computer and use it in GitHub Desktop.
Save kengoudsward/625576 to your computer and use it in GitHub Desktop.
[assumes everything is installed]
cd ruby_rails [ie, wherever you want to keep all your rails projects]
rails new_project [create the project]
ruby new_project/script/server [wow - your new app is up!]
[ctrl-c to kill it]
[in new_project dir, do]
git init
git add .
git status
git commit -m "Initial commit"
[need also git push if save to server, assumes new_project repository exists, if not first create it a github.com]
git remote add origin [email protected]:YOURGITHUBUSERNAME/new_project.git
git push origin master
[later... make some edits]
git checkout -b modify-README [creates new branch named modify-README]
[edit some files]
[want to rename a file?] git mv README README.markdown
[new files?] git add .
git status
git commit -a -m "comment about what you changed"
git log [show history]
git branch [shows branch tree]
[merge]
git checkout master
git merge modify-README
git branch -d modify-README
[you would want the branch to be all done and tested before you merge it]
[sort of a Release Point]
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment