o setup a folder on a server which service for remote Git repository, apply the following steps:

  1. Create a folder on a shared server.
  2. Apply the git command on that folder: git init –bare
  3. 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.
  4. 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:
    1. Open .git folder, open the config file (without extension) in the text editor.
    2. 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的更多相关文章

  1. 『现学现忘』Git基础 — 4、Git下载与安装

    目录 1.Git下载 2.Git在Windows下的详细安装 3.验证Git是否安装成功 1.Git下载 进入官方地址下载Git客户端:https://git-scm.com/download/win ...

  2. git pull“No remote repository specified”解决方法

    git pull“No remote repository specified”解决方法 学习了:http://www.paopaoche.net/jiaocheng/77226.html 修改“.g ...

  3. 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 ...

  4. 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 ...

  5. git如何merge github forked repository里的代码更新?(转)

    参考内容:git如何merge github forked repository里的代码更新? [refer to ]http://www.haojii.com/2011/08/how-to-git- ...

  6. git如何更新fork的repository(Fork一个别人的repository,做了一些改动,再合并别人的更新)

    Fork一个别人的repository,做了一些改动,想提交pull request的时候,发现原先别人的repository已经又有了一些更新了,这个时候想使得自己fork出的repository也 ...

  7. git如何merge github forked repository里的代码更新

    git如何merge github forked repository里的代码更新? 问题是这样的,github里有个项目ruby-gmail,我需要从fork自同一个项目的另一个repository ...

  8. git: fatal: Not a git repository (or any of the parent directories): .git

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

  9. github多用户git push错误remote: Permission to user1/z.git denied to user2

    背景:同一台电脑的public key同时添加到了github的两个账户,导致user1的仓库没法正常提交. 解决办法:为两个账户分别配置ssh key,配置~/.ssh/config文件(windo ...

随机推荐

  1. Python3+PyCharm+PyQt5配置进行GUI开发

    一.安装Python3.5以上版本. 链接:https://www.python.org/downloads/windows/ 二.安装PyQt5. 使用pip安装:1.进入 C:\Users\你的计 ...

  2. 内网转发之reGeorg+proxifier

    先将reGeorg的对应脚本上传到服务器端,reGeorg提供了PHP.ASPX.JSP脚本,直接访问显示“Georg says, 'All seems fine'”,表示脚本运行正常. 运行 pyt ...

  3. PHP 利用闭包偷窥马对人类的想法

    <?php /** * reference:http://www.php.net/manual/en/reflectionmethod.getclosure.php * Learn this a ...

  4. [网络流 24 题] luoguP2756 飞行员配对方案问题

    [返回网络流 24 题索引] 题目描述 英国皇家空军从沦陷国征募了大量外籍飞行员.由皇家空军派出的每一架飞机都需要配备在航行技能和语言上能互相配合的 222 名飞行员,其中 111 名是英国飞行员,另 ...

  5. 部署在本服务器上,Jenkins无法启动Tomcat

    今天在部署Jenkins的过程中,有一个需要部署在本服务器上的Web服务,而且Jenkins给我的反馈也是成功的部署了,且Tomcat启动起来了,但是实际打开项目发现其实并没有启动起来 在查看日志的时 ...

  6. CVE-2016-7124漏洞复现

    CVE-2016-7124漏洞复现 __wakeup()魔术方法绕过 实验环境 操作机:Windows 10 服务器:apache 2.4 数据库:mysql 5.0 PHP版本:5.5 漏洞影响版本 ...

  7. Halcon一日一练:获取图像属性

    从图像属性我们可以了解图像的基本信息,比如大小,高度,指针等. Halcon提供了获取图像属性的算子. 我们来看看下面例子: **获取图像属性 read_image(Image,'Clip') dev ...

  8. SpringBoot HATEOAS用法简介

    REST风格简介 介绍HATEOAS之前先简单介绍一下REST,REST 是 Representational state transfer 的缩写,翻译过来的意思是表达性状态转换.REST是一种架构 ...

  9. Ubuntu18.04 安装PGSQL

    关系数据库管理系统是许多网站和应用程序的关键组成部分.它们提供了一种结构化的方式来存储,组织和访问信息. PostgreSQL或Postgres是一个关系数据库管理系统,提供SQL查询语言的实现.它是 ...

  10. Yii 数据库重连告别General error: 2006 MySQL server has gone away

    General error: 2006 MySQL server has gone away 错误原因 制造错误 解决办法 最新办法 错误原因 Mysql has gone away MySQL 服务 ...