Git push to live server

Yes you can push directly to your webserver, but I wouldn’t recommend it since you should only push to repositories cloned with the –bare argument. I’d utilize the Git hook system to let the main repository automatically update the repo on the web server. Check out the post-update hook in: http://git-scm.com/docs/githooks This script could in …

Read more

Merge two remote branches in a Git repository

If you have remote-tracking branches set up locally, it’s as simple as: git checkout production git merge development git push origin production If you have not yet set up remote-tracking branches, you could do something like: git fetch origin git checkout production # or `git checkout -b production origin/production` if you haven’t set up production …

Read more

SSH-Keygen “no such file or directory”

The command could not save your key, likely because it was unable to determine your $HOME directory. Specify a file, at a location where you have write access: ssh-keygen -t rsa -b 4096 -C “my@emailaddress.com” -f /path/to/key This will save your private key in /path/to/key and the public key in /path/to/key.pub. When successful, instead of …

Read more