problem setting up a GIT repository with Bare

Asked

Viewed 276 times

7

I have a repository of a server that was a problem and could not clone its repositories for the new server GIT, so I copied the entire application development environment through the USB stick, it is as follows. after installing GIT without problem.

inside /var/git/projeto.git are the directories and files of GIT and within /usr/share/www/html is the application. inside the directory /var/git/projeto.git i copied the old server directories that belong to GIT:

HEAD branches description hooks info objects refs config index logs packed-refs

then I turned the command:

/var/git/projeto.git$ git init --shared --bare
Initialized shared Git repository in... /var/git/projeto.git

inside /usr/share/www/html/ where this application used the command.

/usr/share/www/html/$ git add --all

He added the files to monitor, but when I change something remotely and use a git commit and then git pull, etc., there is no change in the file

inside /var/git/projeto.gt/hooks I changed the script to play the changes that go up with the pull to the right place /usr/share/www/html/

I have already searched several articles on but none clarified me why this is happening.

  • Is your problem still current? If yes, you can explain it again with more precision please?

  • the remote of the cloned repository /var/share/www/html is pointing to /var/git/projeto.git correctly?

1 answer

0


Check the appointment for the remote. The project should still be looking at the old server. git remote -v. You can then add a new remote. git remote add upstream /var/git/... and execute the commands pull push for him. git pull upstream master. The name upstream could be anyone.

https://git-scm.com/docs/git-remote

Browser other questions tagged

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