簡單的終端操作--for 更新上傳檔案

來源:互聯網
上載者:User

標籤:

1:cd--進入項目目錄(cd projiect/)

2:ls--查看項目目錄

3:git branch--查看分支

4:git status--查看狀態

5:git checkout staging--切換分支

6:mysql.server start--啟動資料庫

7:git pull origin staging--更新

8:rake db:migrate--資料庫遷移

9:bundle--安裝項目依賴包

10:rails s--啟動項目

 

 

11:git flow feature start zz---建立一個分支,在該分支上開發自己的項目

12:用sublime修改檔案

13:git add .--添加修改的所有檔案

14:git diff>~/zz.diff--儲存修改的所有檔案(儲存到了個人資料夾下面)

15:git commit -a -m ‘任務號以及錯誤‘--提交修改的檔案到本地

16:git flow feature finish zz--關閉建立的獨立的分支,併合並該分支的內容到staging分支上面

17:git push origin staging--發送到遠端伺服器

 

如果遇到要先更新再提交?

  1:git stash--把自己的加緩衝

  2:更新

  3:git stash apply--找到自己的緩衝

 

git diff --cached   檔案不見之後  可以這樣把diff弄出來

git diff --cached > ~/ooo.diff---這樣把diff儲存下來。

 

添加檔案後先add再修改

在application.css.scss中引入樣式檔案

 

簡單的終端操作--for 更新上傳檔案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.