git - Can I combine my local Github repository with WAMP localhost folder? -


i have c:\users\my\documents\github local github repository, , c:\wamp\www work on projects locally wampserver.

what appropriate setup work them both? should tell git use 'www' local repository? combine localhost github??

you use --work-tree or --git-dir argument of git in order to:

  • be in github folder, mention working tree www

    cd c:\users\my\documents\github git --work-tree=c:\wamp\www status 
  • or in www folder , mention git repo in github one

    cd c:\wamp\www status git --git-dir=c:\users\my\documents\github\.git 

the other approach have git repo in both, , pulling github www.

    cd c:\wamp\www status     git add remote origin c:\users\my\documents\github     git pull origin master 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -