[cmake-developers] Gitish questions ... again

Brad King brad.king at kitware.com
Tue Aug 24 16:22:56 EDT 2010


On 08/24/2010 04:12 PM, Eric Noulard wrote:
> 1) git checkout master (local master tracking from git://cmake.org/cmake.git)
> 2) git checkout -b MyBranch
> 3) git pull github MyBranch (gitgub is my github remote:
> url=git at github.com:TheErk/CMake.git)

The spurious commit came from the "pull" because your local MyBranch
did not start from the same place the github MyBranch started.  The
pull had to merge instead of just fast forward.  You brought everything
on master since you started the topic into the branch.

Replace the first three steps with

 git fetch github
 git checkout -b MyBranch github/MyBranch

to create a local branch that exactly matches the one on github.

> 4) git checkout next (local next tracking from git://cmake.org/cmake.git)

Add

 git pull origin next

here to be sure next is up to date.

> 5) git merge MyBranch
> 6) git push

Good.

Alternatively, replace steps 4-6 with

 git push stage HEAD
 ssh git at cmake.org stage cmake merge -b next MyBranch

-Brad



More information about the cmake-developers mailing list