uboot——git代码仓

1,注册GitHub帐号,创建GitHub项目代码仓库

https://www.cnblogs.com/LoTGu/p/6075994.html 参考其第二段,注册账号,设置仓库。

2,上传代码

  • 测试连接   ssh -T git@github.com
  • 配置邮箱与用户名
    •   git config --global user.email "注册邮箱"
    •        git config --global user.name "用户名“
  • 进入要上传的文件根目录,
  • git init 
  • git add .    (获得管理)
  • git  commit -m "注释信息"   (提交)
  • git remote add origin git@github.com:xiaozhao777/uboot-201609-tiny4412.git 建立连接

  • git push -u origin master  (第一次需要加-u  ,后面更新代码不需要)

#################################################################################

git branch -a  查看分支:多了 remotes/origin/master远程版本库分支。

原文地址:https://www.cnblogs.com/chu-yi/p/10374494.html