GIT does not upa new or changed files remote location

3

Good afternoon everyone

I've set up a git server to centralize projects and upload changes to remote servers, but I can not push push new files or changes to existing ones on the client server, I made the settings as follows.

The client1 server already exists files so I accessed the existing directory with files and made git init --shared it generated the git config files in .git

On the server that will be the GIT centralizer

I created a directory called / project the RSA key is already configured and accessible the user git is allowed to create or change in the directory of the client1

I made git clone [email protected]:/projeto/ and the project was cloned to the centralizing server

Cloning into 'projeto'...
remote: Counting objects: 825, done.
remote: Compressing objects: 100% (815/815), done.
remote: Total 825 (delta 73), reused 0 (delta 0)
Receiving objects: 100% (825/825), 234.39 MiB | 17.13 MiB/s, done.
Resolving deltas: 100% (73/73), done.

I made a git add --all

I created a test file touch teste

git status

On branch master
Untracked files:
use "git add <file>..." to include in what will be committed)
    teste

then a git add -A after git status

On branch master
Changes to be committed:
 (use "git reset HEAD <file>..." to unstage)
  new file:   teste

After git pull :

Already up-to-date.

After git commit teste

When I send the file to client1, git push origin returns the message

Everything up-to-date

but the file is not up for client1. I've done a lot of testing and nothing.

If anyone can help me thank you!

    
asked by anonymous 03.08.2018 / 21:05

2 answers

0

I have solved the problem.

I did not understand why this happened but there was a missing file in the hooks file

post-commit.sample with var

GIT_WORK_TREE = / projects / git checkout -f

I added this parameter and it worked as expected

    
07.08.2018 / 02:10
2

Whenever you commit it is necessary to report a message.

git commit teste -m "arquivo teste"
    
03.08.2018 / 21:33