git错误pathspec did not match any file(s) known to git及相关操作

git error: pathspec  did not match any file(s) known to git

本地文件与远程无对应:我这里的情况是在执行./update_nrp update --all

git pull
Already up to date.

git fetch
git branch -a
* master
  remotes/origin/HEAD -> origin/development
  remotes/origin/IBA1
  remotes/origin/NRPJP-11
  remotes/origin/NRRPLT-6627_single_activity_log_file
  remotes/origin/NRRPLT-6751-2
  remotes/origin/NRRPLT-6823
  remotes/origin/NRRPLT-6828_fine-tune
  remotes/origin/NRRPLT-6948-update-nest-to-2.16
  remotes/origin/NRRPLT-6970-update-gzbridge-18
  remotes/origin/NRRPLT-7082-spinnaker-install-script
  remotes/origin/NRRPLT-7082-spinnaker-install-userscript
  remotes/origin/NRRPLT-7290
  remotes/origin/NRRPLT-7440
  remotes/origin/NRRPLT-7492
  remotes/origin/NRRPLT-7911-refactor-parsing-and-process
  remotes/origin/NRRPLT-7968
  remotes/origin/debug
  remotes/origin/dev_nrp4
  remotes/origin/development
  remotes/origin/fix-generatelowrespbr
  remotes/origin/gazebo_ros_pkgs_fix
  remotes/origin/master

git fetch

git branch -a 可以查看远程所有的分支

git branch 可以查看本地所有的分支

* (HEAD detached at origin/master)
  development
  master

git branch -d master 可以删除本地分支

git checkout -b master 创建新分支

git pull

Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master2

 git branch -u origin/master master创建远程分支到本地分支的连接

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当你在使用Git时,如果出现"error: pathspec 'delelop' did not match any file(s) known to git"的错误提示,这意味着Git无法找到与指定路径规范匹配的任何文件。 要解决这个问题,你可以考虑以下几个步骤: 1. 确保你正确地输入了文件路径。检查拼写错误或者路径是否存在。 2. 确保你当前所在的分支或工作目录中有与指定路径规范匹配的文件。你可以使用"git status"命令来查看当前的文件状态。 3. 如果你想使用的文件是在其他分支上的,你可能需要切换到该分支,然后再次尝试执行相应的操作。 4. 如果你想添加或提交文件,确保你已经使用"git add"命令将文件添加到暂存区。然后使用"git commit"命令提交更改。 5. 如果你使用的是某些特定的Git命令,比如"git checkout"、"git merge"等,你可能需要查看相应命令的参数和用法,确保你正确地使用了它们。 总之,当出现"error: pathspec 'delelop' did not match any file(s) known to git"的错误提示时,你需要检查所使用的文件路径是否正确,并确保文件存在于当前分支或工作目录中。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Git使用之(pathspec master did not match any file(s) known to git) 问题解决](https://blog.csdn.net/wangming520liwei/article/details/115175723)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [Git使用之(pathspec master did not match any file(s) known to git)](https://blog.csdn.net/lxw1844912514/article/details/119926764)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值