• git的入门使用



    在github新建一个仓库

    此命令初始化一个新本地仓库
    1.git init 目文件夹下面的文件都添加进来 2.git add .
    提交说明 3.git commit
    -m ''
    让本地仓库和远程仓库建立连接
    4.git remote add origin +  //远程仓库地址

    把本地仓库push到github上面
    5.git push origin master
    如果push上去出现以下情况
    $ git push origin master
    To https://github.com/1769073060/Mybatis.git
     ! [rejected]        master -> master (fetch first)
    error: failed to push some refs to 'https://github.com/1769073060/Mybatis.git'
    hint: Updates were rejected because the remote contains work that you do
    hint: not have locally. This is usually caused by another repository pushing
    hint: to the same ref. You may want to first integrate the remote changes
    hint: (e.g., 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.

    解决办法

    $ git pull --rebase origin master  --先把远程拉下来
    $ git push origin master   --再提交本地就好了
     
     

    # 显示所有远程仓库

    $ git remote -v

  • 相关阅读:
    Java操作Excel之POI简单例子
    机器学习之KNN算法
    机器学习之sklearn数据集
    数据分析之matplotlib
    数据分析之pandas
    数据分析之numpy
    python模块contextlib
    前端jsonp解决跨域问题
    django media和static配置
    Django之数据库迁移和创建
  • 原文地址:https://www.cnblogs.com/rzkwz/p/12423840.html
Copyright © 2020-2023  润新知