美文网首页
同步提交代码

同步提交代码

作者: Spring_java | 来源:发表于2020-04-19 19:26 被阅读0次

公司目前登录github网速很慢,所以在码云上创建了gitee仓库。保证代码能提交到码云,回去后,再推送到github上。

可以参考这个文章:https://www.cnblogs.com/HDWdemo/p/12666629.html

配置:

  • 1:打开 .idea下面的conf文件,目前是github地址
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://github.com/XXX/XXX.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

  • 2:在码云上新建仓库 XXX
    在最下面增加配置。
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://github.com/hyoGirl/MySpringBoot.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "gitee"]
    url = https://gitee.com/XXX/XXX.git
    fetch = +refs/heads/*:refs/remotes/origin/*

提交

  • 1:查看分支
    git remote -v
  • 2:提交代码

相关文章

  • 同步提交代码

    公司目前登录github网速很慢,所以在码云上创建了gitee仓库。保证代码能提交到码云,回去后,再推送到gith...

  • github- 常用的git的命令记录

    commit ——提交至本地代码仓库,不会提交到远程仓库 push——将本地代码仓库的变动同步到远程仓库中

  • Git常用操作

    新建代码仓库 配置 增加/删除文件 代码提交 分支 标签 查看信息 远程同步 撤销

  • Git命令

    将 master 分支代码同步到子分支上(子分支:first) 将子分支(first)代码同步(提交)到主分支 m...

  • svn提交代码

    使用svn提交代码到服务器,做简单的记录以防忘记。 ./表示当前目录 添加所有文件 提交代码。 同步代码: 添加新...

  • Git 常用命令

    仓库 配置 增加/删除文件 代码提交 分支 标签 查看信息 远程同步 撤销 其他

  • git常用命令

    新建代码库 配置 Git的设置文件为.gitconfig 增加/删除文件 代码提交 分支 标签 查看信息 远程同步...

  • git 常用命令

    新建代码库 配置 增加/删除文件 代码提交 分支 标签 查看信息 远程同步 撤销 其他 转载至:https://w...

  • Git

    Git图解 仓库 配置 增加/删除文件 代码提交 分支 标签 查看信息 远程同步 撤销 其他

  • GitHub Actions

    GitHub Actions Gitee与GitHub自动同步 当github上的项目代码master分支提交后,...

网友评论

      本文标题:同步提交代码

      本文链接:https://www.haomeiwen.com/subject/srmbbhtx.html