新建本地仓库
git init
git clone url 克隆仓库
清屏
clear
上传
git status [专门文件] ------查看文件状态
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
s.txt
nothing added to commit but untracked files present (use "git add" to track)
git add . ----暂存
黄建胜@DESKTOP-L4RSI8Q MINGW64 /e/测试git (master)
$ git add .
黄建胜@DESKTOP-L4RSI8Q MINGW64 /e/测试git (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: s.txt
git commit -m “提交内容”
$ git commit -m "new file: s.txt"
[master (root-commit) 0a8f894] new file: s.txt
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 s.txt
黄建胜@DESKTOP-L4RSI8Q MINGW64 /e/测试git (master)
$ git status
On branch master
nothing to commit, working tree clean
忽略文件
.gitignore文件配置
克隆加速
1.转到码云
2.github.com—>github.com.cnpmjs.org