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

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

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

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

你可能感兴趣的:(C++基础,Python,Ubuntu和git(WSL),git)