Branch Management

Christian Lohmaier lohmaier+libreoffice at googlemail.com
Thu Aug 15 03:21:14 PDT 2013


Hi Joel, *,

On Tue, Aug 13, 2013 at 5:49 PM, Joel Madero <jmadero.dev at gmail.com> wrote:
> On 08/13/2013 12:44 AM, Thorsten Behrens wrote:
>>
> 2. Explaining branch management a bit better - I guess technically this is
> part of understanding git but when the step is there for how to create a
> branch on our wiki, it should be explained that this includes unstaged
> changes from other branches (ie they are carried over)

I don't quite understand. Git branch will not randomly include
unpushed changes from other branches.

But of course if you create a branch based on your
"commit-this-stuff-to-gerrit" branch, git will include all changes
from "commit-this-stuff-to-gerrit" - as that is what you told it to
do.


> and explain the
> difference between git commit -a (which I was told NEVER DO, that's where I
> went wrong yesterday as I had assumed that git commit -a only commits
> changes done immediately on that branch not unstaged changes from other
> branches) vs. whatever method we should be using

git commit -a just commits everything that was changed in your working
copy. As if you had done "git add" on all files that git status
reports as changed/added/deleted. Again this has nothing to do with
other branches with unpushed changes.

And yes, you never should use commit -a, at least not without checking
with git show /git log -p afterwards.

ciao
Christian


More information about the LibreOffice mailing list