git error pathspec did not match any file(s) known to git and related operations

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

There is no correspondence between the local file and the remote: my situation here is executing ./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 can view all remote branches

git branch can view all local branches

* (HEAD detached at origin/master)
  development
  master

git branch -d master can delete local branches

git checkout -b master creates a new branch

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 creates a connection from a remote branch to a local branch

 

Guess you like

Origin blog.csdn.net/li4692625/article/details/113813904