Subject: Re: [boost] [git] Effect of "git checkout develop" on submodule?
From: Cox, Michael (mhcox_at_[hidden])
Date: 2013-12-02 16:20:01
On Mon, Dec 2, 2013 at 12:36 PM, Daniel James <daniel_at_[hidden]>wrote:
> On 2 December 2013 19:14, Beman Dawes <bdawes_at_[hidden]> wrote:
> > On Mon, Dec 2, 2013 at 1:09 PM, Daniel James <daniel_at_[hidden]>
> >> Oh, I just tried it and git now creates a local branch if you try to
> >> checkout a remote branch with no local copy. I don't think it used to
> >> do that.
> FWIW this was introduced in git 1.6.6. If you check out a branch that
> doesn't exist locally, but does on a single remote, it automatically
> creates a local branch.
In regards to the version of git used, I think we should specify somewhere
on the web-site the minimum version of git required to do boost
development. The latest version of git is somewhere in the 1.8.x series of
releases. The oldest release will have to be 1.7.2 or above since that
when the added the new EOL usage (core.eol and .gitattributes).
> >> You are checking out a local branch here, you need to merge or pull
> >> the remote branch. You can tell when it's checking out a remote branch
> >> because it says something like, "Branch develop set up to track remote
> >> branch develop from origin."
> > OK, did this: "git checkout -B develop remotes/origin/develop"
> > Got the message you indicated.
> The problem with this is that you might overwrite some local changes
Git is very paranoid about loosing work in the work directory (actually
anywhere). If you don't specify -f/--force, that should never happen. If
it does, file a git bug report.
> on accident. It's better to do:
> git checkout develop
> git pull
> Which will pull the latest changes from the remote branch into the local
> Btw. you can usually just write 'origin/develop' rather than
Once you've done a "git clone --recursive..." you can just do the
git checkout develop
You only have to "git pull" if it's a "stale" repository (haven't been
using it for a while).
Also, be careful using the -B option, it's the equivalent of a -f/--force.
If you already have a branch with that name and have changes on it, they
will be "lost" in the git object database (there not actually lost since
the commits are in the object database, but you have no easy way to access
them via references. My experience is the you only lose anything if you
force it or rebase, so I think twice before doing either).
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk