Git Heroku 基本命令總結

2021-05-26 06:41:47 字數 1515 閱讀 3659

1, git

(1)git 安裝(一般安裝了ror,這git早就安裝好了);

(2)生成ssh;

quick guide 1:creating and commiting

$ cd (project-directory)

$ git init

$ (add some files)

$ git add .

$ git commit -m 'initial commit'

git 與 heroku 結合:

別人的總結參考:

quick guide 2:cloning and creating a patch

$ git clone git:

$ cd hello-world

$ (edit files)

$ git add (files)

$ git commit -m 'explain what i changed'

$ git format-patch origin/master

2. heroku

安裝heroku gem : $gem install heroku

詳細參考:

$

$git init

initialized empty git repository in .git/

$git add .

$44 files changed, 8393 insertions(+), 0 deletions(-)

(2) set up your ssh keys, 參考1中的

建立完ssh keys後,將其新增到heroku:

heroku keys:add$

heroku create

enter your heroku credentials.

email: [email protected]

password:

uploading ssh public key /users/joe/.ssh/id_rsa.pub

created | [email protected]:high-sunrise-58.git

git remote heroku added$

git push heroku master

(5) bootstrap your database

$

heroku rake db:migrate

next steps

1. develop and test changes locally.

2. commit code to git :$ git commit -a ("-a" represents committing all changed files).

3. push your changes to heroku with :$git push heroku

4. don't forget to migrate database when db change.

mysql基本命令總結 mysql基本命令總結

1.在ubuntu上安裝mysql sudo apt get install mysql server sudo apt get install mysql client 2.安裝結束後,用命令驗證是否安裝並啟動成功 sudo netstat tap grep mysql 通過上述命令檢查之後,如果...

linux基本命令總結

ls 檔案列表 wc l filewc w filewc c file 計算檔案行數計算檔案中的單詞數計算檔案中的字元數 cp sourcefile destfile 檔案拷貝 mv oldname newname 重新命名檔案或移動檔案 rm file 刪除檔案 grep pattern file...

Vim 基本命令總結

基礎命令 w 儲存 q 退出 組合命令 q 不儲存退出 wq 儲存並退出 基本命令格式 number motion 其他游標移動命令 gg 移動到文件首 g 移動到文件尾 234 跳到第234行 46 跳到文件46 的位置 基本命令格式 operation number motion operati...