1.正在学习uboot代码,涉及到代码的修改,所以想先把源码由git管控,再修改代码也好有个对照
2.已经配置好git基本配置,也在gitee创建了账户
3.直接对代码进行git add报错
错误信息 "fatal: not a git repository (or any of the parent directories): .git" 表示你当前的目录不是一个 Git 仓库,或者你的 Git 仓库配置在父目录中,但你不在该目录下。
4.初始化git仓库
git init
5.git add操作
git add uboot-imx-rel_imx_4.1.15_2.1.0_ga/6
6.git commit操作
git commit -m "NXP uboot"
7.git push报错
8.这个错误通常发生在尝试推送代码到远程 Git 仓库时,但是本地的 Git 仓库没有正确地设置远程仓库的地址,或者远程仓库的地址不正确。
git remote -v 为空
9.添加远程仓库
git remote add origin [仓库的URL]
仓库的URL:
10.git push