I can’t set up remote GIT on the server

Asked

Viewed 135 times

0

I can’t configure GIT to climb the server.

I started git locally and set up 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 set the url of this.git project there in GIT ADD REMOTE.

Between several tests, there have already been two occurrences: 1st - After GIT PUSH ORIGIN MASTER, everything went up, everything was ok, but on the server there were no files, that is, it did not go up. 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 don’t know how else to properly configure git on the server. =/

Can help me?

1 answer

0

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

mkdir myapp myapp.git

Between 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 file . txt only for test level:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.