GitHub连接
复制GitHub仓库:
git clone [url]
eg: git clone https://github.com/hjhcos/hjhcos.github.io.git(这是个例子!)
GitHub更新
需要由GitHub仓库的权限,或者使用账户登入。
将GitHub库上面的文件更新到本地
1.从远程仓库下载新分支与数据:
git fetch
2.从远端仓库提取数据并尝试合并到当前分支:
git merge
将本地文件更新到GitHub库上面。
1.查看当前仓库代码状况:
git status
2.选择add的文件或者全部更新:
git add *
3.commit 到暂存区:
git commit -m "注释"
4.pull 当前最新代码:
git pull
5.push 到github:
git push origin master
查看当前远程库
git remote
千万不能乱使用删除命令rm
git remote rm [origin]