[cmake-developers] Adding argument "OPTIONAL" to find_package() and add_subdirectory

Brad King brad.king at kitware.com
Mon Jun 20 17:21:26 EDT 2011


On 06/20/2011 05:14 PM, Alexander Neundorf wrote:
> Hmm, I think I managed the rebasing, but now git complains when I try to push:
> 
> hammer:~/src/CMake/CMake-git$ git push stage HEAD
> To git at public.kitware.com:stage/cmake.git
>  ! [rejected]        HEAD -> DisableSwitchForFindPackage (non-fast-forward)
> error: failed to push some refs to 'git at public.kitware.com:stage/cmake.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.

Use "+" in your refspec:

  git push stage +HEAD

to overwrite the existing branch.  Use with care.

> Why should I need to pull, nobody else pushed to this branch ?

Those are just generic instructions Git gives when this type of push fails.
The author of the instructions is assuming a certain workflow which we are
not using.

-Brad



More information about the cmake-developers mailing list