在本地新建文件夹,用来存放git文件
前提:在github上注册账号,并新建一个项目xxx
命令行输入:git init初始化,git会自动创建.git文件夹
cd <目录>
git init

命令行输入:命令用于添加远程主机
git remote add <主机名> <git 地址>

git pull <主机名> <分支> --allow-unrelated-histories

git add <file> 添加文件
git commit -m "comment" commit到本地库,并添加说明

git push --set-upstream <主机名> <分支>


git status 查看目前的状态

git log 查看历史操作
git rm <file> 删除文件
git clone <github 地址> 克隆
网友评论