進行環境配置,需要在官網下載下傳git,,node,,ruby,,sass,,grunt,,PHP
連結:https://pan.baidu.com/s/1QAJdd6QOcu0PR5y7F8ID3w 密碼:5oql
具體安裝根據官網說明進行安裝,
其中sass是css的預處理;grunt是建構工具,PHP是伺服器語言,git是倉庫管理;
git 官網 https://gitscm.com/downloads
node官網: http://nodejs.cn/
ruby官網:https://rubyinstaller.org/
git常用指令
git生成公鑰私鑰指令:
cd ~/.ssh (查找電腦上之前有沒有生成) 沒有的話 建立一個檔案 mkdir ~/.ssh
ssh-keygen -t rsa -C '郵箱号'
##生成的公鑰在‘~/.ssh/id_rsa.pub’中
全局配置:(使用者資訊)
git config --global user.name '使用者名'
git config --global user.meail '郵箱号'
常用指令:
git clone git://github.com/smalot/bootstrap-datetimepicker.git 該隆項目
git init 初始化倉庫
git status 檢視目前分支狀态
git add .
git commit -m "ddd" 送出
git pull 下拉倉庫内容
git push 更新
grunt work:b-activity 監聽b-activity項目事件
git publish:項目檔案夾 推到遠端倉庫
git branch branchName 建立分支
git checkout branchName 切換分支
git checkout -b branchName 合并子分支到項目分支
npm run dev 在本地浏覽器打開
Linux系統常用指令
cd e 進入到一個檔案夾
mkdir <項目名> 建立一個檔案夾或者檔案
cat index.html 顯示index的内容
檔案和目錄
cd /home 進入 '/ home' 目錄'
cd .. 傳回上一級目錄
cd ../.. 傳回上兩級目錄
cd 進入個人的主目錄
cd ~user1 進入個人的主目錄
cd - 傳回上次所在的目錄
pwd 顯示工作路徑
ls 檢視目錄中的檔案
ls -F 檢視目錄中的檔案
ls -l 顯示檔案和目錄的詳細資料
ls -a 顯示隐藏檔案
ls *[0-9]* 顯示包含數字的檔案名和目錄名
tree 顯示檔案和目錄由根目錄開始的樹形結構(1)
lstree 顯示檔案和目錄由根目錄開始的樹形結構(2)
mkdir dir1 建立一個叫做 'dir1' 的目錄'
mkdir dir1 dir2 同時建立兩個目錄
mkdir -p /tmp/dir1/dir2 建立一個目錄樹
rm -f file1 删除一個叫做 'file1' 的檔案'
rmdir dir1 删除一個叫做 'dir1' 的目錄'
rm -rf dir1 删除一個叫做 'dir1' 的目錄并同時删除其内容
rm -rf dir1 dir2 同時删除兩個目錄及它們的内容
mv dir1 new_dir 重命名/移動 一個目錄
cp file1 file2 複制一個檔案
cp dir/* . 複制一個目錄下的所有檔案到目前工作目錄
cp -a /tmp/dir1 . 複制一個目錄到目前工作目錄
cp -a dir1 dir2 複制一個目錄
ln -s file1 lnk1 建立一個指向檔案或目錄的軟連結
ln file1 lnk1 建立一個指向檔案或目錄的實體連結
touch -t 0712250000 file1 修改一個檔案或目錄的時間戳 - (YYMMDDhhmm)
file file1 outputs the mime type of the file as text
iconv -l 列出已知的編碼
iconv -f fromEncoding -t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
find . -maxdepth 1 -name *.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)
轉載于:https://www.cnblogs.com/lvxisha/p/9753026.html