← Back to blog home

Posts Tagged ‘git’

Using git to deploy to live server based on branch aka how to git push to server

02 Dec

I often see people asking how to push their changes to the dev or live server. I agree with the common sentiment that you should probably use a proper deployment script, but I also think for most simple sites git is fairly sufficient.

To accomplish this I made a git hooks script that executes a pull from the appropriate web root depending on the branch.

Read the rest of this entry »

 
No Comments

Posted in Guides

 

non-fast-forward updates were rejected Merge the remote changes before pushing again

02 Dec

When I first switched from a centralized version control to decentralized (or distributed) version control I ran in to this error:

non-fast-forward updates were rejected Merge the remote changes before pushing again

 Well,

you just have to –force or use a bare repository they told me.

First of all, don't –force. If you just started using git you almost certainly should never need to use the –force command. If you come across something that requires it there is a good chance that you simply don't quite understand git yet.

Read the rest of this entry »