WebFaction
Community site: login faq
2
1

I used the guidelines described here:

http://docs.webfaction.com/software/git.html#creating-a-new-repository

cd ~/webapps/git/repos
git init --bare wukh.git
cd repo.git
git config http.receivepack true

Then I wanted to add an existing directory into git:

cd ~/webapps/
git clone ~/webapps/git/repos/wukh.git

This gave the following error:

fatal: destination path 'wukh' already exists and is not an empty directory.

Then, I tried some other ways to put ~/webapps/wukh under git version control. But they didn't work neither.

What is the correct way of putting an existing directory into git version control?

asked 15 Feb '13, 06:21

mertnuhoglu
284713
accept rate: 0%

edited 15 Feb '13, 06:22


These steps seem to work for me: How to convert existing non-empty directory into a Git working directory and push files to a remote repository

Translating that to WebFactionese for your example:

cd ~/webapps/git/repos
git init --bare wukh.git
cd repo.git
git config http.receivepack true
cd ~/webapps/wukh
git init
git add .
git commit -m 'message'
git remote add origin ~/webapps/git/repos/wukh.git
git push -u origin master

Hope that helps!

permanent link

answered 15 Feb '13, 11:26

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111

question asked: 15 Feb '13, 06:21

question was seen: 15,827 times

last updated: 15 Feb '13, 11:26

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM