logoalt Hacker News

mejutocoyesterday at 6:19 PM2 repliesview on HN

In case anybody is interested, having a bare git repo on a server is as easy as:

    # locally
    ssh [email protected]
    
    # server
    mkdir repo.git  
    cd repo.git  
    git --bare init
    
    # locally
    git remote add origin ssh://[email protected]/home/git/repo.git  
    git push origin master

P.S. I know it does not have the same features as github

Replies

SpaceNoodledyesterday at 6:36 PM

It has all the same working features as github

stephenryesterday at 6:59 PM

If it's your ssh server and it's single user you don't need to use the "git@" part at all.

Just store the repo and access it with your account.

The whole git@ thing is because most "forge" software is built around a single dedicated user doing everything, rather than taking advantage of the OS users, permissions and acl system.

For a single user it's pointless. For anyone who knows how to setup filesystem permissions it's not necessary.

show 2 replies