Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

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?

like image 220
JAyenGreen Avatar asked Oct 24 '13 04:10

JAyenGreen


1 Answers

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
like image 108
VonC Avatar answered Oct 23 '22 11:10

VonC