GIT no new or changed files remote location

Asked

Viewed 316 times

3

Good afternoon to all

I set up a git server to centralize projects and upload the changes to remote servers, but I can’t push new files or changes to the client server, I made the settings as follows.

the Server cliente1 already exists files so I downloaded the existing directory with files and did git init --shared it generated the git config files on .git

On the server that will be the GIT centralizer

created a directory named /project the RSA key is already configured and accessible the git user is allowed to create or change in the cliente1 directory

did the git clone [email protected]:/projeto/ and the project was cloned to the centralizer 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.

made a git add --all

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 afterward git status

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

Afterward git pull:

Already up-to-date.

Afterward git commit teste

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

Everything up-to-date

but the file is not uploaded to the client1. I have done several tests and nothing.

If anyone can help me, I’d appreciate it!

  • You get some git response after you do git commit teste? What appears if another one git status now?

  • appeared the following [master 6cdd3c9] test file 1 changed file, 0 insertions(+), 0 deletions(-) create mode 100644 test

2 answers

2

Whenever a commit is required to report a message.

git commit teste -m "arquivo teste"
  • look so I committed in this way git commit test -m "test file" [master 6cdd3c9] test file 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test git status # On branch master # Your branch is Ahead of 'origin/master' by 1 commit. # (use "git push" to Publish your local commits) # # Changes to be Committed: # (use "git reset HEAD <file>..." to unstage) # # new test

0


Guys I managed to solve.

I didn’t understand why this happened but a file was missing in the file

post-commit.sample with var

GIT_WORK_TREE=/projects/ git checkout -f

added this parameter and worked as expected

Browser other questions tagged

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