github 操作查阅 创建仓库 代码更新

Add the repository...

git remote add [url]

Bind your name, email

git global user.name "[name]"
git global user.email email

Add to local and Write your comment (must procedure)

git add .
git commit -m "[comment]"
git pull origin master

If fetal: refused to merge

Use this:

git pull origin master –-allow-unrelated-histories

Hand in your local code.

git push -u origin master

If counterpart happens. add

-f 

to your push code.

原文地址:https://www.cnblogs.com/venusian/p/9965464.html