git push origin master not pushing the files

后端 未结 2 1082
眼角桃花
眼角桃花 2021-01-06 22:39

I have setup my remote git and local git on my mac I was able to create a git repo (git init myrepo) on the remote machine (Linux) Added few files and committed them no prob

2条回答
  •  情话喂你
    2021-01-06 23:01

    You are probably pushing to a bare repository. You must clone it someplace and pull from the remote in order to see live changes.

    To create a bare repository at myPath; you'll need to be logged into a shell on myIP:

    1. mv myPath myPath2 # saves the live repository
    2. git clone --bare myPath2 myPath # creates the bare repository

    Now your push should work and follow @VonC's instructions above in configuring your post-receive hook.

提交回复
热议问题