problem configuring a GIT repository with bare

7

I have a repository of a server that gave problem and it was not possible to clone its repositories to the new server's GIT, so I copied the whole application development environment through the pendrive, it is as follows. after installing GIT without problem.

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

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

Then I ran the command:

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

within /usr/share/www/html/ where the application used the command.

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

It added the files to monitor, but when I change something remotely and use a git commit and then git pull , etc., the change in the file does not appear

Within /var/git/projeto.gt/hooks I've changed the script to play changes that go up with the pull to the correct location /usr/share/www/html/

I have already searched for several articles about but none has clarified why this is happening.

    
asked by anonymous 25.11.2015 / 16:49

1 answer

0

Check the pointing to 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 pull push commands for it. git pull upstream master . The name upstream can be any one.

link

    
03.03.2017 / 00:59