git 创建本地仓库与 gitcafe 关联
git init # 创建本地仓库# 设置远程仓库地址,这里可以设置ssh 或 https 的形式,此处设置为https 格式,
# ssh 格式为 : gitremote add origin git@coding.net:sql031625/test.git
git remote add origin https://git.coding.net/sql031625/test.git
touch a.py # 创建文件,使仓库有新的变更
git add . # 添加所有变更
gitcommit-m'first' # 注释
git push -u oringinmaster # 推送代码,第一次使用 -u ,以后便可以不使用 -u 参数
# 可以设置 git config --global push.default matching命令,使得push命令默认push到github的同名仓库中
页:
[1]