[gitHub实践] git基础:远程仓库的使用
[gitHub实践] git基础:远程仓库的使用
版权2019.6.2更新
git 基础
远程仓库的使用
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基础:远程仓库的使用的更多相关文章
- 6.Git基础-远程仓库的使用
远程仓库是指托管在因特网或其他网络中的你的项目的版本库.比如你在GitHub中托管的代码库,就是远程仓库. 1.查看远程仓库 -- git remote git remote 查看已经配置的远程仓 ...
- Git 基础 - 远程仓库的使用
远程仓库的使用 要参与任何一个 Git 项目的协作,必须要了解该如何管理远程仓库.远程仓库是指托管在网络上的项目仓库,可能会有好多个,其中有些你只能读,另外有些可以写.同他人协作开发某个项目时,需要管 ...
- git基础-远程仓库的使用
远程仓库的使用 为了能在任意 Git 项目上协作,你需要知道如何管理自己的远程仓库. 远程仓库是指托管在因特网或其他网络中的你的项目的版本库. 你可以有好几个远程仓库,通常有些仓库对你只读,有些则可以 ...
- Git--01 基础 - 远程仓库的使用
目录 Git 基础 - 远程仓库的使用 远程仓库的使用 查看远程仓库 添加远程仓库 从远程仓库中抓取与拉取 推送到远程仓库 查看某个远程仓库 远程仓库的移除与重命名 Git 基础 - 远程仓库的使用 ...
- git使用-远程仓库(github为例)
1.登录github(没有先注册账号) 2.settings>SSH and GPG keys>New SSH key Title(自己填写即可) key需要git命令生成 ssh-key ...
- git学习——远程仓库操作
查看当前的远程库——git remote 列出了仅仅是远程库的简单名字 可以加上-v 现实对应的克隆地址 添加远程仓库——git remote add [shortname] [url] git re ...
- [转]git修改远程仓库地址
原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库 ...
- 为git创建远程仓库
首先生成ssh公钥: 将公钥添加到git: 测试秘钥是否通过: 然后就可以到web界面看到标注的地方被绿了: 但是我的没有绿,不知道为啥,难道没有女朋友的原因吗? rm -rf .ssh 重来好几遍都 ...
- git从远程仓库拉取内容或向远程仓库上传内容
一.将本地文件上传到远程仓库步骤 git init git add . git commit -m "初始框架" git remote add origin https://git ...
随机推荐
- 数据节点Datanodes
- @atcoder - ARC066F@ Contest with Drinks Hard
目录 @description@ @solution@ @accepted code@ @details@ @description@ 给定序列 T1, T2, ... TN,你可以从中选择一些 Ti ...
- art-template web模板引擎引入JS函数
art-template语法 可以在模板引擎中加入自定义的函数; template.defaults.imports.LocalShortDate = LocalShortDate; 在模板引擎中的用 ...
- Top 10 open source projects of 2015
Top 10 open source projects of 2015 Posted 15 Dec 2015Jen Wike Huger (Red Hat)Feed 188 up 31 comment ...
- Android 自定义界面的弹出框(可输入数据)
上午写了一篇博文,介绍了如何定义从屏幕底部弹出PopupWindow,写完之后,突然想起之前写过自定义内容显示的弹出框,就随手写了两个实例,分享出来: 第一种实现方式:继承Dialog 1.1 线定义 ...
- 添加SuperSocket的启动代码到 Windows Azure 的 WorkRole 项目
与其它SuperSocket程序相同,启动代码同样也要写到程序的入口处,如 Windows Azure 的 WorkRole 项目的OnStart() 方法: public override bool ...
- 用户注册页的布局及js逻辑实现(正则,注册按钮)
文章地址:https://www.cnblogs.com/sandraryan/ 先写一个简单的静态页面,然后对用户输入的内容进行验证,判断输入的值是否符合规则,符合规则进行注册 先上静态页面 < ...
- HTTP协议详解以及URL具体访问过程(转载)
https://blog.csdn.net/f45056231p/article/details/82533490
- PHP程序员技术职业生涯,你是如何规划的?
职业规划是这样的 看到很多PHP程序员职业规划的文章,都是直接上来就提Linux.PHP.MySQL.Nginx.Redis.Memcache.jQuery这些,然后就直接上手搭环境.做项目,中级就是 ...
- iOS设备 微信h5页面回退 内容不刷新的问题
原因分析: 一.android 浏览器 包括微信的开发者工具 都是ok的返回可以刷新页面但是唯有iOS不行. 二.iOS 浏览器原因:history.go(-1)返回上一页后,页面内容并不会刷新.在B ...