git 常用命令

 touch .gitignore    //创建忽略文件

git clone 'http://github/网址'      //克隆网站

git add .       //添加文件

git commit -m '提交文件备注'

git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)

git强制覆盖:
    git fetch --all
    git reset --hard origin/master
    git pull

git push origin master --force 本地提交强制覆盖远程分支

原文地址:https://www.cnblogs.com/yangda/p/10601018.html