Adding a Repository

Last edit

Added:

> ## Allow non-fast-forward push
> On the server, edit the `.git/config` file in the repo and remove this:
> ```
> [receive]
> denyNonFastforwards = true
> ```


As root on sibirocobombus run add-git-repo to add a new repository.

Here's an example of an existing project:

~/src/face $ git remote -v
origin	git@github.com:kensanata/face.git (fetch)
origin	git@github.com:kensanata/face.git (push)

Let's add the new repo:

git remote rename origin github
git remote add origin ssh://git@alexschroeder.ch:882/home/git/repo-name
git push -u origin

Note that you will need to add your ~/.ssh/id_rsa.pub to git@alexschroeder.ch's ~/.ssh/authorized_keys.

The result:

~/src/face$ git remote -v
github	git@github.com:kensanata/face.git (fetch)
github	git@github.com:kensanata/face.git (push)
origin	ssh://git@alexschroeder.ch:882/home/git/face.git (fetch)
origin	ssh://git@alexschroeder.ch:882/home/git/face.git (push)

Allow non-fast-forward push

On the server, edit the .git/config file in the repo and remove this:

[receive]
	denyNonFastforwards = true