Baptiste Alexandre
Baptiste Alexandre

Reputation: 91

Git push to remote but cannot pull from local

I have one git repository on a local server. I want to clone my project to a server that cannot access to Internet. (only SSH available). I cloned my project, then copied it on the Webserver "dev".

I added a "dev" git remote.

Let's say I just did a new commit that adds a new file.

When I do on the local server

 git push dev master

It pushes everything to the remote server. Then I do

 git log 

on the remote server, and i see the last commit in the log, but the new file does not appear in the folder.

When I do on the remote server

git status

# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.

But those commits were not applied on the remote server.

I can't do

 git pull

as the server cannot access internet and that it couldn't anyways pull from the local server.

What command could I do to apply the changes on the remote server ?

Thank you very much.

Upvotes: 0

Views: 91

Answers (1)

kan
kan

Reputation: 28951

You are pushing to non-bare repository. Do you see a warning message?

Anyway read this:

wekeroad.com/2011/09/17/deploying-a-site-with-git-hooks and

ryanflorence.com/deploying-websites-with-a-tiny-git-hook

Upvotes: 1

Related Questions