2

I have a local machine and a server. I am using GitLab. Anytime I deploy my code from local, I wish to automatically deploy my code on server machine. Currently the issue that I am facing is, when I am deploying code from local to server(SSH), I have to login to my server to pull the changes and see. I dont want to run "pull command". How can I do without running pull command ?

Aastha
  • 27
  • 2

1 Answers1

1

You could push to your server (instead of login and pulling)

If you have git 2.4+ on your server, go to your repo on your server and type:

git config receive.denyCurrentBranch=updateInstead

You can then push (always the same branch) and your repo will be updated directly.
See "What is this Git warning message when pushing changes to a remote repository?"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250