在一个客户的服务器上部署好客服系统后,过了好一段时间,客户又要更新一下,更新的过程中遇到了一些问题

git查看当前的远程仓库地址


git remote -v

当前分支没有跟踪信息

There is no tracking information for the current branch.
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> master
这是因为本地分支与远程分支没有追踪关系
git branch --set-upstream-to=origin/远程分支 本地分支
git branch --set-upstream-to=origin/master master


git 仓库里有文件,本地没有文件


该文件已被删除或移动到其他位置。您可以尝试使用 git status 命令查看该文件是否已被删除或移动

这是本地修改了文件,或者删除了文件,并且还没有add 或 commit过

如果有变动,可以 git checkout 文件路径,把变动撤销掉

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐