Search code examples
gitgithubgit-push

How to make git push run faster


Is there a way to tell git to push the changes to the github remote server a little faster. It takes a longer time (~8-10 secs) even for minor changes on few files in a bare minimal rails application.


Solution

  • Try creating a directory ~/.ssh/control and then adding this to your ~/.ssh/config:

    Host github.com
      ControlMaster auto
      ControlPath ~/.ssh/control/%r@%h:%p
      ControlPersist 3600
    

    This will cause ssh to reuse existing connections to github for one hour, which will eliminate the time taken to reauthenticate during that time.