[gitHub实践] git基础:远程仓库的使用

版权2019.6.2更新

  • git 基础

    1. 远程仓库的使用

      • git remote

        # 查看远程仓库
        $ git remote # 克隆的仓库服务器默认名字
        origin # origin起源
        $ git remote -v # 读写远程仓库git保存的简写与其对应的URL
        origin https://github.com/pengwill/eduSystem.git (fetch) # fetch取得
        origin https://github.com/pengwill/eduSystem.git (push) # 添加远程仓库
        $ git remote add <shortname> <url>
      • git fetch [remote-name]

        # 从远程仓库中抓取与拉取
        # git fetch origin 会抓取新推送的所有工作,不会合并或者修改当前工作 # git pull 自动抓取远程分支到当前分支,git clone 命令会自动设置本地master分支跟踪克隆的远程仓库master分支。
      • git push [remote-name] [branch-name]

        # 推送到远程仓库
        # 多人合作时,要求先拉取合并,再推送
      • git remote show [remote-name]

        # 查看远程仓库(更多信息)
        $ git remote show
        origin
        $ git remote show origin
        * remote origin
        Fetch URL: https://github.com/pengwill/eduSystem.git
        Push URL: https://github.com/pengwill/eduSystem.git
        HEAD branch: master
        Remote branches:
        cfj tracked
        dev_tp tracked
        master tracked
        Local branch configured for 'git pull':
        master merges with remote master
        Local ref configured for 'git push':
        master pushes to master (local out of date)
      • git remote rename

        # 重命名远程仓库的简写名
        $ git remote rename old new
      • git remote rm

        # 移除远程仓库
        $ git remote rm new

|版权声明:除特别注明外,本博客所有文章均为博主T.P原创,转载请注明出处:https://www.cnblogs.com/tp0829/p/10963165.html

[gitHub实践] git基础:远程仓库的使用的更多相关文章

  1. 6.Git基础-远程仓库的使用

    远程仓库是指托管在因特网或其他网络中的你的项目的版本库.比如你在GitHub中托管的代码库,就是远程仓库. 1.查看远程仓库 --  git remote  git remote 查看已经配置的远程仓 ...

  2. Git 基础 - 远程仓库的使用

    远程仓库的使用 要参与任何一个 Git 项目的协作,必须要了解该如何管理远程仓库.远程仓库是指托管在网络上的项目仓库,可能会有好多个,其中有些你只能读,另外有些可以写.同他人协作开发某个项目时,需要管 ...

  3. git基础-远程仓库的使用

    远程仓库的使用 为了能在任意 Git 项目上协作,你需要知道如何管理自己的远程仓库. 远程仓库是指托管在因特网或其他网络中的你的项目的版本库. 你可以有好几个远程仓库,通常有些仓库对你只读,有些则可以 ...

  4. Git--01 基础 - 远程仓库的使用

    目录 Git 基础 - 远程仓库的使用 远程仓库的使用 查看远程仓库 添加远程仓库 从远程仓库中抓取与拉取 推送到远程仓库 查看某个远程仓库 远程仓库的移除与重命名 Git 基础 - 远程仓库的使用 ...

  5. git使用-远程仓库(github为例)

    1.登录github(没有先注册账号) 2.settings>SSH and GPG keys>New SSH key Title(自己填写即可) key需要git命令生成 ssh-key ...

  6. git学习——远程仓库操作

    查看当前的远程库——git remote 列出了仅仅是远程库的简单名字 可以加上-v 现实对应的克隆地址 添加远程仓库——git remote add [shortname] [url] git re ...

  7. [转]git修改远程仓库地址

    原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库 ...

  8. 为git创建远程仓库

    首先生成ssh公钥: 将公钥添加到git: 测试秘钥是否通过: 然后就可以到web界面看到标注的地方被绿了: 但是我的没有绿,不知道为啥,难道没有女朋友的原因吗? rm -rf .ssh 重来好几遍都 ...

  9. git从远程仓库拉取内容或向远程仓库上传内容

    一.将本地文件上传到远程仓库步骤 git init git add . git commit -m "初始框架" git remote add origin https://git ...

随机推荐

  1. iOS学习--详解UIView的 contentStretch属性

    通过实例和图片理解UIView的contentStretch属性 方法 通过一个图片建立一个简单的UIImageView 设置它的contentStretch属性 修改它的frame属性 观察 测试用 ...

  2. Serverless助力AI计算:阿里云ACK Serverless/ECI发布GPU容器实例

    ACK Serverless(Serverless Kubernetes)近期基于ECI(弹性容器实例)正式推出GPU容器实例支持,让用户以serverless的方式快速运行AI计算任务,极大降低AI ...

  3. less的引入和使用

    文章地址:https://www.cnblogs.com/sandraryan/ 之前就了解过less,但项目一直用的是css,所以,重新做一次系统的了解,顺便写个博客Orz 简介 less和sass ...

  4. H3C RARP

  5. ras 加解密类,支持截取

    class RsaEncrypt{ private $_privateKey = false; private $_publicKey = false; /** * 私钥解密 * @param $da ...

  6. [转载] 虚拟机3种网络模式(NAT, Host-only, Bridged)

    实例讲解虚拟机3种网络模式(桥接.nat.Host-only) 转载自:http://www.cnblogs.com/ggjucheng/archive/2012/08/19/2646007.html ...

  7. [转载] CentOS系统开机自动挂载光驱 和 fstab文件详解

    参考 http://blog.itpub.net/12272958/viewspace-676977/ 一.开机自动挂载光驱 1.按习惯,root用户,在/media目录下建立目录cdrom——mkd ...

  8. Python--day48--今日内容

  9. Python--day41--递归锁Rlock

    1,递归锁Rlock:递归锁是为了解决死锁问题,且递归锁的特点是在同一个线程中可以被acquire()多次 多个acquire()在递归锁中不会阻塞,而互斥锁Lock就会阻塞 代码示例: from t ...

  10. SpringBoot+Thyemleaf开发环境正常,打包jar发到服务器就报错Template might not exist or might not be accessible

    网上查看了各种解决的思路,总结如下: 1. 在controller层请求处理完了返回时,没有使用@RestController或@ResponseBody而返回了非json格式 这种情况下返回的数据t ...