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. RF分层封装

    1.如何管理用例? (1).在ride工具中分层管理用例(案例层.元素层.流程层),提高效率 (2).偶尔运行下,保证脚本能正常跑动 2.用例分层操作 案例层:需要加载流程层.txt资源和Seleni ...

  2. Jmeter数据库测试参数化

    一.JDBC Request参数化 方法一.Jmeter参数化,在sql query中使用变量 Jmeter参数化,使用csv参数化 sql query中使用${变量名}引用 设置变量 输出结果: 方 ...

  3. [USACO09JAN]安全出行Safe Travel 最短路,并查集

    题目描述 Gremlins have infested the farm. These nasty, ugly fairy-like creatures thwart the cows as each ...

  4. 修改配置文件application.properties

    附录A.常用应用程序属性 可以在application.properties文件内部application.yml,文件内部或命令行开关中指定各种属性.本附录提供了常见Spring Boot属性的列表 ...

  5. c++11::std::optional

    std::optional还有一个类似于智能指针的接口, 它可以显式转化为bool来表示std::optional是否有一个值. 指针的解引用操作符*和->都实现了, 但是没有std::bad_ ...

  6. NServiceBus+RabbitMQ开发分布式应用

    前言      NServiceBus提供了8种传输管道组件,分别是Learning.MSMQ.Azure Service Bus.Azure Service Bus (Legacy).Azure S ...

  7. 2019.10.24 CSP%你赛第二场d1t3

    题目描述 Description 精灵心目中亘古永恒的能量核心崩溃的那一刻,Bzeroth 大陆的每个精灵都明白,他们的家园已经到了最后的时刻.就在这危难关头,诸神天降神谕,传下最终兵器——潘少拉魔盒 ...

  8. webpack4+koa2+vue 实现服务器端渲染(详解)

    _ 阅读目录 一:什么是服务器端渲染?什么是客户端渲染?他们的优缺点? 二:了解 vue-server-renderer 的作用及基本语法. 三:与服务器集成 四:服务器渲染搭建 4.1 为每个请求创 ...

  9. day3-02 python入门之基本的数据类型

    目录 一.整型(int) 二.浮点型(float) 三.字符串类型(str) 字符串在python2和python3中的细微区别 四.复数 五.列表(list) 六.数据字典(dict) 定义方式 七 ...

  10. WARNING: The host 'WeiLei' could not be looked up with resolveip.

    [root@WeiLei data]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysq ...