git init
在一个文件夹初始化 得到一个.git
git remote add origin git@github.com:gzsyf/仓库名
远程连接其中一个仓库
git pull --rebase origin master
把仓库里面的东西先git下来
git add NRF51822/Hardware/KeyScan/key_scan.h
先在对于位置放置文件 然后输入git add 也可以git add -A
git commit -m "xxx"
然后提交到本地仓库
git push -u origin master
然后Git到github
关于git bash here的配置
— 安装与配置 —
添加ssh
https://blog.csdn.net/weixin_43127338/article/details/83965053
下载 git bash here
https://www.cnblogs.com/yifanrensheng/p/11969852.html
远程连接github
https://www.cnblogs.com/zxf330301/p/8493245.html
配置环境变量 系统与用户都要
https://blog.csdn.net/weixin_30482383/article/details/101803101
— 可能遇到的坑 —
fatal: Not a git repository
https://blog.csdn.net/wenb1bai/article/details/89363588
fatal: pathspec ‘README.md’ did not match any files
https://www.cnblogs.com/zhang007/p/9531154.html
bash: $’\302\226’: command not found
https://blog.csdn.net/xunzi229/article/details/52143940