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