1, create a local warehouse
$ git init # 初始化一个git仓库,增加.git目录
2, add the files to the staging area
$ git add file
$ git add dir/*
$ git status # 查看文件状态
3. If you do happen to submit, delete the temporary file area
$ git rm --cache file
4, will be submitted to the staging area to the workspace file
$ git commit -m "注释"
5, add a remote repository (remote repository need to create)
$ git remote add origin https://9.110.187.100/test/scripts.git # 远程仓库地址 将当前仓库与远程仓库关联,且远程仓库alias为origin
$ git remote # 查看本地仓库关联的远程仓库
6, this project will be pushed to the remote repository
$ git push origin https://9.110.187.100/test/scripts.git
或
$ git push --set-upstream origin master
7, pull the remote repository
$ git clone https://9.110.187.100/test/scripts.git