zoukankan      html  css  js  c++  java
  • 实际应用中git(合并本地与服务器项目)

    在服务器直接操作后 本地要做合并操作  否则push会报错误

    $ git push
    To https://gitee.com/zdbgit/2048.git
    ! [rejected] master -> master (fetch first)
    error: failed to push some refs to 'https://zdbgit:wmzyq2013@gitee.com/zdbgit/2048.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.

    1、(先进入项目文件夹)通过命令 git init 把这个目录变成git可以管理的仓库

    git init

    2、把文件添加到版本库中,使用命令 git add .添加到暂存区里面去,不要忘记后面的小数点“.”,意为添加文件夹下的所有文件

    git add .

    3、用命令 git commit告诉Git,把文件提交到仓库。引号内为提交说明

    git commit -m 'first commit'

    4、关联到远程库

    git remote add origin 你的远程库地址

    如:

    git remote add origin https://github.com/cade8800/ionic-demo.git

    5、获取远程库与本地同步合并(如果远程库不为空必须做这一步,否则后面的提交会失败)

    git pull --rebase origin master

    6、把本地库的内容推送到远程,使用 git push命令,实际上是把当前分支master推送到远程。执行此命令后会要求输入用户名、密码,验证通过后即开始上传。

    git push -u origin master

    *、状态查询命令

    git status

    备:详细请参考 http://www.cnblogs.com/tugenhua0707/p/4050072.html

  • 相关阅读:
    循环神经网络
    第四次作业:卷积神经网络 part 3
    《Strip Pooling: Rethinking Spatial Pooling for Scene Parsing》——笔记
    《Selective Kernel Networks》——笔记
    《Non-local Neural Networks 》——笔记
    HybridSN中添加SE模块
    第三次作业:卷积神经网络 part 2
    第一次作业:深度学习及pytorch基础
    需要背的板子
    Codeforces 1474F. 1 2 3 4 ... 题解
  • 原文地址:https://www.cnblogs.com/zhang-bin/p/9772454.html
Copyright © 2011-2022 走看看