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 ?
            Asked
            
        
        
            Active
            
        
            Viewed 435 times
        
    2
            
            
        - 
                    By "server" do you mean Gitlab? Or do you have three locations: workstation, GitLab, deployment server? – Basilevs Jan 19 '16 at 06:32
- 
                    Why do you want to deploy without `git pull`? – Konstantin Jan 19 '16 at 07:03
1 Answers
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?"
 
     
    