zoukankan      html  css  js  c++  java
  • 代码同时上传到github和码云

    目前git的大平台有国内的gitee,国外的github

    那么如何在本地仓库同时上传到这两个平台呢?

    首先要在项目目录下右键选择Git Bash Here:

    如果没有Git Bash Here的话安装地址:https://tortoisegit.org/download/

    下面是具体操作:

    //删除 已关联的名为origin的远程库:

    >git remote rm origin

    //关联gitee 的远程库gitee_demo 关联git地址: https://gitee.com/xxx/demo.git

    >git remote add gitee_demo https://gitee.com/xxx/demo.git

    //关联github 的远程库github_demo 关联git地址: https://github.com/xxx/demo.git

    >git remote add github_demo https://github.com/xxx/demo.git

    //查看本地库连接的远程看

    >git remote -v

    会显示:

    gitee_demo git@gitee.com:xxx/demo.git(fetch)

    gitee_demo git@gitee.com:xxx/demo.git(push)

    github_demo git@github.com:xxx/demo.git(fetch)

    github_demo git@github.com:xxx/demo.git(push)

    //推送命令

    //推送github:

    >git push github_demo master

    //推送gitee:

    >git push gitee_demo master

    如果在sourcetree中右键master->推送到, 就会发现有github_demo以及gitee_demo的选项

    然后选择某个远程库就会上传到相应的库中,当然上传的过程中如果没设置过账号密码,会弹出提示框重新设置下
    ————————————————
    版权声明:本文为CSDN博主「fking86」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/jinxinxin1314/article/details/104572140

    https://github.com/godmaybelieve
  • 相关阅读:
    Access restriction: The constructor SunJCE() is not accessible due to restriction on required librar
    我选择,我奋斗
    C/C++语言写程序时的“段错误”总结
    VC中临时窗口与持久窗口的对比
    一个WinSocket编程实例
    error PRJ0003 : 生成“cmd.exe”时出错
    编辑利器VIM
    LED数码管的学习
    这个世界诱惑太多
    计算机英语名词简释
  • 原文地址:https://www.cnblogs.com/yuyu666/p/15077396.html
Copyright © 2011-2022 走看看