简体   繁体   中英

Setting up a git repository on the same server that the code will be deployed to

I have git installed on my Ubuntu server and on my client. I'm planning to install git-flow as well.

When I create a project on the server, to where I will pull either the test branch or the production branch (both are on the same server), after I do the git init, what do I do about naming the remote, given that the repository is on the same server?

If you clone it locally, the remote will be named for you.

git clone /path/to/repo
cd repo
git remote -v

You will see a remote named origin , referring to /path/to/repo .

That would be the same as:

mkdir repo
cd repo
git init .
git remote add origin /path/to/repo
git pull

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