Create a Remote Git repository


At your server:

Commands:

ssh test@server.com// user: test server: yourserver.com or ip address

mkdir gitrepo.git// Project name: gitrepo.git

git init –bare

git update-server-info

Change git working tree ( where real project will be stores when you push from local )

cd gitrepo.git/hooks

vim post-receive

GIT_WORK_TREE=/home/{Your username}/{project_name} //You can give your folder structure.

P.S: Assusmed that you have linux server and git in sever

Al Local folder:

Go to your local git repo

git remote add origin test@server.com:/{You location of gitrepo.git}

e.g: git remote add origin test@server.com:/home/test/gitrepo.git

Then commit your changes, Push your changes

 git push -u origin master

Advertisements

About sathia

Web developer at cloudmint
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s