News for hackers. Stuff that matters.
Re:Git from the inside out by kinghajj on Friday March 27, 2015 @01:27PM (#9277731)
The only way I know of that "push" can cause problems is with "--force"... so just tell people not to do that! If you attempt to push a non-fast-forwardable commit to a remote branch, Git will complain and stop with a message like

     ! [rejected]        master -> master (non-fast-forward)
    # error: failed to push some refs to 'https://github.com/
    USERNAME/REPOSITORY.git'
    # To prevent you from losing history, non-fast-forward updates were rejected
    # Merge the remote changes (e.g. 'git pull') before pushing again.  See the
    # 'Note about fast-forwards' section of 'git push --help' for details.

There are no comments on this comment yet.