简体   繁体   中英

Creating local remote git repo

sorry if this has been answered somewhere but my hour of searching was fruitless.

Im trying to set up an auto-build repo for my application on a local machine. My goal is to have my normal git repo for development and collaboration and then once it is ready for a build to push to a remote repo on a local machine that will use a hook to trigger an auto-build.

My problem is trying to create a remote repo on my local machine. I had no problem creating a remote repo using a git URL but I'm not sure how to go about setting up a local repo that is accessible by ssh keys.

From what I've read it should be something like this: git remote add buildrepo user@localMachine:~/poject/buildrepo

If someone could give me some advice, point me in the right direction or tell me I'm silly for trying to do it this way it would be greatly appreciated!

Looks like I had it pretty much right! This helped me out:

http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/

I needed to create a bare git repo at the local location and then add it as a remote from my development location.

Ex: mkdir ~/project/buildrepo/proj.git cd ~/project/buildrepo/proj.git git init -bare cd ~/project/dev git remote add buildrepo usr@machine:~/project/buildrepo git push buildrepo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM