I can not configure the remote GIT on the server

0

I can not configure GIT to upload to the server.

I started git locally and set up the GIT REMOTE (apparently) right, following some tutorials found on the web.

On the server, I created the folder where the repositories will be, the project folder (/repo/project.git) and after that GIT INIT --BARE.

I seted the url of this project.git there in GIT ADD REMOTE.

Among several tests, there have been two occurrences: 1 - After the GUS PUSH ORIGIN MASTER, everything went up, everything went ok, but on the server were not the files, ie not uploaded. 2nd -

fatal: '/repo/projeto.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I do not know how to properly configure git on the server. = /

Can you help me?

    
asked by anonymous 25.10.2016 / 15:09

1 answer

0

On the remote server create a folder for your project and another folder to store git

mkdir myapp myapp.git

Enter cd myapp.git and start a bare repository git init --bare

Clone the repository to your local machine:

git clone ssh://myserver.com/webapps/myapp.git 

On your machine create a test-level .txt file only:

touch teste.txt

On your machine add the project to git git add . and git commit -m "Start Project"

Update the remote repository git push origin master

    
25.10.2016 / 15:29