zoukankan      html  css  js  c++  java
  • 本地代码push到git

    1、gitlab上创建blank工程 test

    https://aaa.bbb.ccc:1234/xxx/test

    2、cd到本地代码目录

    ①编辑好.gitignore文件

    .idea
    .classpath
    .project
    *.iml
    target/
    .DS_Store
    .gitattributes
    out

    ② 

    git init

    git add .

    git commit -m "init"

    git remote add origin ssh://aaa.bbb.ccc:1234/xxx/test.git

    git push origin master (-f)

    #报错:fatal: remote origin already exists.

    git remote -v 查看远程库信息,发现已经存在

    删除关联的origin的远程库 git remote rm origin

    重新add

  • 相关阅读:
    6月17日
    6月16日
    6月15日
    6月14日
    6月13日
    6月12日
    6月11日
    6月10日
    6月8日
    6月5日
  • 原文地址:https://www.cnblogs.com/floud/p/15122166.html
Copyright © 2011-2022 走看看