[cctbxbb] Making branches by accident

markus.gerstel at diamond.ac.uk markus.gerstel at diamond.ac.uk
Thu Dec 8 10:12:37 PST 2016

Hi Nigel,

The log (and the blame log) should show the times of the commit, regardless of whether you merge the branch into master or rebase your branch onto master at the end.

When you rebase your commits you can also get the rebase time. eg. for your last rebased commit:
$ git show 4fa192b0 --format=fuller
The author+date pair is the person who originally wrote the code (rather: who made the original commit), the commit+date pair is set by whoever rebased/cherry-picked/etc. it last.


PS: Just to clarify - if you deliberately use branches to do isolated feature development, merging is absolutely fine.

From: cctbxbb-bounces at phenix-online.org [cctbxbb-bounces at phenix-online.org] on behalf of Nigel Moriarty [nwmoriarty at lbl.gov]
Sent: Thursday, December 08, 2016 17:41
To: cctbx mailing list
Subject: Re: [cctbxbb] Making branches by accident


I was a non-rebaser but I have set it to true on my second machine. So my question is regardind branches. I have made a branch, made some changes and merged the master into the branch. I will make some more changes during testing. I assume that I merge into the master at some point. Will the commits appear in the log based on the time of the merge or the time I committed in the branch?



Nigel W. Moriarty
Building 33R0349, Molecular Biophysics and Integrated Bioimaging
Lawrence Berkeley National Laboratory
Berkeley, CA 94720-8235
Phone : 510-486-5709     Email : NWMoriarty at LBL.gov
Fax   : 510-486-5909       Web  : CCI.LBL.gov<http://CCI.LBL.gov>

On Thu, Dec 8, 2016 at 12:14 AM, <markus.gerstel at diamond.ac.uk<mailto:markus.gerstel at diamond.ac.uk>> wrote:
I use a custom prompt so I can see what is going on when I am in a git repository folder.

This is the code one could add to their ~/.bashrc:

This is what it looks like:

This is what happens in the image:
* yellow brackets indicate you are in git territory, and contain the current branch name
* red branch name = uncommitted changes in repository
* positive number: number of commits the local repository is ahead of the remote repository
* the 'git pull' command causes an implicit merge commit, which I undo with the next command
* negative number: number of commits the local repository is behind the remote repository
* both negative and positive number: branches have diverged

Maybe someone finds it useful.


From: cctbxbb-bounces at phenix-online.org<mailto:cctbxbb-bounces at phenix-online.org> [cctbxbb-bounces at phenix-online.org<mailto:cctbxbb-bounces at phenix-online.org>] on behalf of Pavel Afonine [pafonine at lbl.gov<mailto:pafonine at lbl.gov>]
Sent: Wednesday, December 07, 2016 18:24
To: cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org>
Subject: Re: [cctbxbb] Making branches by accident

This happened to me a few times now, and just double-checked that my .gitconfig contains "rebase = true". Let's see if it happens again..

On 12/7/16 00:02, Graeme.Winter at diamond.ac.uk<mailto:Graeme.Winter at diamond.ac.uk><mailto:Graeme.Winter at diamond.ac.uk<mailto:Graeme.Winter at diamond.ac.uk>> wrote:
Morning all

I am seeing a certain amount of “Merge branch 'master' of github.com:cctbx/cctbx_project” coming through on the commits – this usually means you did not do a git pull –rebase before the git push. This can be set to the default by using the spell Markus sent out

git config --global pull.rebase true

This will need to be done on each machine you push from, else getting the habit of doing a git pull –rebase before push is a good one.

We have had this on and off with DIALS but it tends to pass easily enough.

What bad happens? Nothing really but the history becomes confusing…

So:  may be worth checking that you have the pull.rebase thing set?

Cheerio Graeme


This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

cctbxbb mailing list
cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org><mailto:cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org>>

cctbxbb mailing list
cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org>

More information about the cctbxbb mailing list