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. Oracle数据库提权(低权限提升至dba)

    0x01 Oracle存储过程”缺陷” 在 Oracle 的存储过程中,有一个有趣的特点:运行权限.运行权限分为两种,definer 和 invoker. definer 为函数创建者的权限,而 in ...

  2. prototype与 _proto__的关系

    prototype与 __ proto__ 都是在这个过程中催生的产物,我们一会儿马上讨论,在这之...做对象即可,那javascript种究竟是通过什么来明确继承关系的呢. 一.构造函数: 构造函数 ...

  3. C++ set 用法略解

    先看一段代码. #include<iostream> #include<set> #include<cstdio> #include<cstdlib> ...

  4. Codeforces 986B - Petr and Permutations

    Description\text{Description}Description Given an array a[], swap random 2 number of them for 3n or  ...

  5. [BZOJ5280] [Usaco2018 Open]Milking Order

    Description Farmer John的N头奶牛(1≤N≤105),仍然编号为1…N,正好闲得发慌.因此,她们发展了一个与Farmer John每 天早上为她们挤牛奶的时候的排队顺序相关的复杂 ...

  6. linux使用jq工具解析json

    jq类似一个awk或grep一样的神器,可以方便地在命令行操作json 这里我使用海南万宁的天气接口做演示,地址:http://t.weather.sojson.com/api/weather/cit ...

  7. php函数分为哪两种?

    PHP的真正威力源自于它的函数.函数分为内置函数和自定义函数. 内置函数 所谓PHP内置函数,就是在php程序的库里面已经定义了的函数,比如echo,mysql_connect,include_onc ...

  8. Drive Scope Mac硬盘检查分析神器

    Drive Scope Mac硬盘检查分析神器 硬盘驱动器(和固态驱动器)是Mac中最容易出故障的组件.出于这个原因,事实上,驱动器制造商已将自我监控,分析和报告技术内置于驱动器中.(又名SMART) ...

  9. 【Leetcode 做题学算法周刊】第一期

    首发于微信公众号<前端成长记>,写于 2019.10.28 背景 本文记录刷题过程中的整个思考过程,以供参考.主要内容涵盖: 题目分析设想 编写代码验证 查阅他人解法 思考总结 目录 1. ...

  10. (乱入)FingerGesture

    偶然的机会遇到FingerGesture插件,此插件也有很多方便的功能,比如控制主相机查看模型以及缩放等功能,如Component-FingerGestures-Toolbox-Camera-Orbi ...