zoukankan      html  css  js  c++  java
  • Git pull 出现的错误

    Git的使用

    git pull 出现如下错误:

    There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    If you wish to set tracking information for this branch you can do so with:
    git branch --set-upstream-to=origin/<branch> test
    
    • 原因:本地的分支没有和远程分支建立追踪关系
    • git提示:你需要建立跟踪分支
    • 使用命令:git branch --set-upstream-to=origin/<branch> test
    • <branch> 是你的远程分支名称

    • 新建本地分支:git branch 分支名
    • 切换分支:git checkout 分支名
    • 查看所有分支:git branch -a
    • 删除分支:git branch -d 分支名
    • 推送本地分支:git push origin 本地分支:远程分支
      • 本地分支必须为你本地存在的分支
      • 如果远程分支不存在则会自动创建分支。
    • 删除远程分支:Git push origin :远程分支

    git pull 的出现如下错误:

    Your local changes to the following files would be overwritten by merge
    
    • 本地的代码和服务器代码发生冲突:
      • 两者合并
        • git stash
        • git pull
        • git stash pop
      • 代码库覆盖本地:
        • git reset --hard
        • git pull
  • 相关阅读:
    MySQL主从复制
    Mysql解压版安装配置
    MySQL 多行数据合并 GROUP_CONCAT
    Java集合框架
    Redis 入门知识点
    事务
    Spring AOP 知识点入门
    Tomcat热部署和热加载
    Java的Socket通信简单实例
    nginx和tomcat配置负载均衡和session同步
  • 原文地址:https://www.cnblogs.com/ikai/p/6935294.html
Copyright © 2011-2022 走看看