Can't stop making
Home

Creating a new Git repo on QNAP 409

I assume you've followed an article I wrote earlier and have setup gitosis on your QNAP 409 Pro.

I also assume you're using Eclipse as your IDE and have installed msysgit on your Windows installation and you have the remote gitosis-admin imported into your Eclipse IDE.

To create a new git repo, go to your eclipse IDE

  1. Open up gitosis-admin project
  2. Open up gitosis.conf
  3. Insert a new group into the config file. Something like this will do:
    [group NEWREPONAME]
    writable = NEWREPONAME
    members = MEMBERNAMES
  4. Commit and push back to the QNAP 409 Pro server.
  5. Next open up msysgit git-cmd.bat and a console window will open
  6. CD to the directory you want to create the new repo at. example:
    cd \sites\NEWREPONAME\
  7. git init
  8. create a readme file (or anything you want to be in the inital commit) within the directory
  9. git add -A
  10. git commit -m "initial commit message"
  11. git remote add origin gitosis@<my-qnap-409-address>:NEWREPONAME
  12. git push origin master

Done. You can now import the git project from Eclipse by right clicking and select import -> import from git and add the git repo you've created earlier.

If you encounter an error saying "No value for key branch.master.merge found". If that happens, open .git/config and insert 

[branch "master"]
remote = origin
merge = refs/heads/master

to the bottom of the file and save it, then you should be able to pull properly.

標籤 tag(s)

  • QNAP
  • Git

Version

All

Last Updated

25th August, 2011

First Published

30th June, 2011

Comments

Leave a comment

Any published comments will adhere to the etiquette policy and all e-mail addresses will be treated in accordance to the privacy policy.

  • If you see this, something's wrong with Twitter.

Blatant Plug

Need a new CPU or graphics card? Get AMD.

AMD Vision and AMD Radeon Graphics

Support

I've pledged my support to these organisations, and I think you should too.

  • Google+
  • Follow ronaldslc on Twitter
  • View Ronald Chan's profile on LinkedIn