【git】warning: adding embedded git repository

当遇到Git警告'adding embedded git repository'时,只需删除当前目录下的.git文件夹,然后重新执行git add操作,即可避免警告并正常上传代码。此方法适用于清理不必要的嵌入式仓库信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

warning: adding embedded git repository: git/…

当前目录下面有.git文件夹------默认是隐藏的,直接将.git文件夹掉,再重新git add .

则不再有报警提示,按正常的上传步骤上传代码即可。

commit fa3b51e7799b652bf0e205b1b27c16949132a036 Author: lingzhiqiang <[email protected]> Date: Tue Oct 29 11:05:00 2024 +0800 xhy: 添加mipi摄像头 GC2093 电池恢复6000mA电池曲线 默认关机电压3.4V Change-Id: Ibc8f404a67f60db5455527fdd657cac216e7ba6a commit e2ff5b66561f80dd357a01a52dd02fd3556cd5e6 Author: lingzhiqiang <[email protected]> Date: Tue Oct 29 11:00:58 2024 +0800 xhy: 添加并使用外部功放NS4150 pmu休眠时不影响串口供电 Change-Id: I1872ae2b862307db7ab5517936d99dcc744a279b commit 6723cee337010355d01f0444d9ff377f055e23cc ubuntu@ubuntu2204:~/ubuntu_2204_workplace/Rockchip/rk356x/rk356x_android/test_rk3566/mid_E5/kernel$ ubuntu@ubuntu2204:~/ubuntu_2204_workplace/Rockchip/rk356x/rk356x_android/test_rk3566/mid_E5/kernel$ git add . warning: adding embedded git repository: configs hint: You've added another git repository inside your current repository. hint: Clones of the outer repository will not contain the contents of hint: the embedded repository and will not know how to obtain it. hint: If you meant to add a submodule, use: hint: hint: git submodule add <url> configs hint: hint: If you added this path by mistake, you can remove it from the hint: index with: hint: hint: git rm --cached configs hint: hint: See "git help submodule" for more information. warning: adding embedded git repository: tests ubuntu@ubuntu2204:~/ubuntu_2204_workplace/Rockchip/rk356x/rk356x_android/test_rk3566/mid_E5/kernel$ git commit -m "a" Author identity unknown *** Please tell me who you are. Run git config --global user.email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'ubuntu@ubuntu2204.(none)')
07-10
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值