Git: Setup a remote Git repository
o setup a folder on a server which service for remote Git repository, apply the following steps:
- Create a folder on a shared server.
- Apply the git command on that folder: git init –bare
- Add that folder as the remote repository. In visual studio, it’s quite easily. You enter the ‘name’, ‘path’ in a popup dialog when you adding a remote repository.
- That’s not enough yet. You will get a failed message when pushing to the new-added remote repository. The problem here is, the local ‘master’ branch is not tracking the remote ‘master’ branch yet To add such kind of tracking, you need add the following changes manually:
- Open .git folder, open the config file (without extension) in the text editor.
- Add following codes.
[branch "master"]
remote = origin
merge = refs/heads/master
Now, you can enjoy coding with you next setup repository.
是为之记。
Alva Chien
2016.5.23
Git: Setup a remote Git repository的更多相关文章
- 『现学现忘』Git基础 — 4、Git下载与安装
目录 1.Git下载 2.Git在Windows下的详细安装 3.验证Git是否安装成功 1.Git下载 进入官方地址下载Git客户端:https://git-scm.com/download/win ...
- git pull“No remote repository specified”解决方法
git pull“No remote repository specified”解决方法 学习了:http://www.paopaoche.net/jiaocheng/77226.html 修改“.g ...
- How to get started with GIT and work with GIT Remote Repo
https://www.ntu.edu.sg/home/ehchua/programming/howto/Git_HowTo.html#zz-7. 1. Introduction GIT is a ...
- Using Git subtrees to split a repository
https://lostechies.com/johnteague/2014/04/04/using-git-subtrees-to-split-a-repository/ We are in a p ...
- git如何merge github forked repository里的代码更新?(转)
参考内容:git如何merge github forked repository里的代码更新? [refer to ]http://www.haojii.com/2011/08/how-to-git- ...
- git如何更新fork的repository(Fork一个别人的repository,做了一些改动,再合并别人的更新)
Fork一个别人的repository,做了一些改动,想提交pull request的时候,发现原先别人的repository已经又有了一些更新了,这个时候想使得自己fork出的repository也 ...
- git如何merge github forked repository里的代码更新
git如何merge github forked repository里的代码更新? 问题是这样的,github里有个项目ruby-gmail,我需要从fork自同一个项目的另一个repository ...
- git: fatal: Not a git repository (or any of the parent directories): .git
在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...
- github多用户git push错误remote: Permission to user1/z.git denied to user2
背景:同一台电脑的public key同时添加到了github的两个账户,导致user1的仓库没法正常提交. 解决办法:为两个账户分别配置ssh key,配置~/.ssh/config文件(windo ...
随机推荐
- 蓝牙TWS耳机IBRT的原理初分析
最近在倒腾TWS对耳的一些东西,看到一些源码,发现一个新概念,IBRT没有搞清楚,抱着吾将上下而求索的态度,详细看了一些代码,查了一些资料,还是发现了不少有价值的信息的.至少,我突然感觉自己懂了一些什 ...
- 车载导航应用中基于Sketch UI主题定制方案的实现
1.导读 关于应用的主题定制,相信大家或多或少都有接触,基本上,实现思路可以分为两类: 内置主题(应用内自定义style) 外部加载方式(资源apk形式.压缩资源.插件等) 其实,针对不同的主题定制实 ...
- python selenium单/复选框操作
一.单选:radio 1.首先是定位选择框的位置 2.定位id,点击图标就可以了,代码如下(获取url地址方法:把上面源码粘贴到文本保存为.html后缀后用浏览器打开,在浏览器url地址栏复制出地址就 ...
- Java获取文件中视频的时长
public void ReadVideoTime(String path) { long sum = 0; long num = 0; File source = new File(path[i]) ...
- Vue + Js 面试宝典
https://github.com/rohan-paul/Awesome-JavaScript-Interviewshttps://github.com/nieyafei/front-end-int ...
- 百万年薪python之路 -- 变量及if的练习
1.简述变量命名规范 1.变量由数字,字母,下划线组成 2.不能以数字开头 3.不能使用python关键字 4.不能使用中文和拼音命名 5.区分大小写 6.变量名要具有描述性 7.推荐写法 7.1驼峰 ...
- Markdown进阶(1)
对于工科生来说,在书写Markdown文本时,免不了要和上下标打交道,网上的博客大多良莠不齐,不太友好,本文想尽可能地解决一些在看完基础教程后再来书写Markdown文本时容易遇到的问题. 1.上下标 ...
- (day28)操作系统发展史+进程
目录 一.操作系统发展史 (一)穿孔卡片(手工操作) (二)批处理系统(磁带存储) 1. 联机批处理系统 2. 脱机批处理系统 (三)多道技术 二.进程 (一)程序和进程 (二)进程调度 1. 先来先 ...
- CSS盒子模型+box-sizing
当对文档进行布局时,浏览器渲染引擎会根据css-Box模型(CSS Basic Box model)将所有元素表示为一个矩形盒子.CSS决定这些盒子的大小,位置以及属性(颜色,背景,边框尺寸) 标准盒 ...
- nginx高可用集群
1.配置: (1)需要两台nginx服务器 (2)需要keepalived (3)需要虚拟ip 2.配置高可用的准备工作 (1)需要两台服务器192.168.180.113和192.168.180.1 ...