git 基本用法
阿新 • • 發佈:2017-07-13
out dex 分支 sta ont align git init git clone 文件夾
返回上一個文件
git reset --hard HEAD~1
創建文件
mkdir 文件名
調用文件
cd 文件名
文件夾裏添加文本
touch index.html
文本添加內容
vim 文本名 退出時 按Esc鍵 輸入:wq 回車
上傳文件
初始化
git init
添加工作區間
git add
添加全部文件工作區間
git add
查看當前文件狀態
git status
克隆
git clone (git 文件鏈接)
文件所在地
pwd
提交備註
git commit -am " "
鏈接到git
git remote add origin 鏈接(git創建的文件鏈接)
更新後上傳時如果上傳失敗
git remote add origin
上傳git
git push -u origin master
長期存儲密碼
git config --global credential.helper store
創建分支到切換分支
git checkout -b masters(分支名masters)
git 基本用法