简体   繁体   中英

How do I setup my local Git repository to work with a remote server?

I'm trying to get up and running with git. I have set up a repository on my remote server, where my live site sits. I want to do some work locally on a copy of that site, then push the changes back to the remote server.

How can I checkout/clone a copy of the site from the remote repository?

Can I do this via the Netbeans Git plugin?

If you repo is already set up, you should have git URL to it, it typically looks like

git://server/somerepo.git

to clone repository

git clone git://server/somerepo.git

you will get folder somerepo, it will be cloned repository that you own. As soon as you ready to push changes:

git add -A
git commit -m 'my changes'
git push origin master  

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