[Kmymoney-devel] Git query

Allan agander93 at gmail.com
Wed Feb 22 21:13:52 UTC 2012


On 21/02/12 20:04, Allan wrote:
> On 21/02/12 13:51, Cristian Oneț wrote:
>> 2012/2/21 Cristian Oneț<onet.cristian at gmail.com>:
>>> 2012/2/21 Allan<agander93 at gmail.com>:
>>>> My git branch presently shows :-
>>>>
>>>> # Your branch is ahead of 'origin/master' by 3 commits.
>>>>
>>>> These are :-
>>>>
>>>> a) The first commit of the csv plugin profiles mod.
>>>> b) The latest commit of the csv plugin profiles mod.
>>>> c) A single line removal.
>>>>
>>>> Commit b) supersedes commit a). How do I safely remove it without
>>>> touching
>>>> the others? I'm assuming it's 'git revert<name>', but will that
>>>> leave the
>>>> later ones intact for subsequent pushing? Don't want to foul up.
>>>
>>> Since commit b is after a it means that a is not obsolete since b is
>>> against a. I think what you actually want is to merge all 3 commits
>>> into a single commit. You could read a short description about that
>>> here [1]. Before doing anything backup your work though (git
>>> format-patch origin/master).
>>
>
>> Since commit b is after a it means that a is not obsolete since b is
>> against a. I think what you actually want is to merge all 3 commits
>> into a single commit. You could read a short description about that
>> here [1]. Before doing anything backup your work though (git
>> format-patch origin/master).
>
>> Regards,
>> Cristian
>
>> [1]
>> http://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one
>
> I did google, but the link you gave helped clarify and show what I needed.
>
> It looks as though all went well, - "Your branch is ahead of
> 'origin/master' by 1 commit." In qgit, there is, in red, a dead-end
> branch showing the three original commits, and another line to my master
> with the new single commit.
>
>> BTW: In the future when you need to commit code that you feel that it
>> should part of a previous commit use:
>> git commit --amend
>>
>>> Regards,
>>> Cristian
>
> Thanks for that, too, and to Jack.
>
> Allan
> _______________________________________________

Just querying whether or not all is well here.

As I said above, "In qgit, there is, in red, a dead-end
branch showing the three original commits, and another line to my master
with the new single commit."

I was about to do a git --amend to add the small changes resulting from 
my battles with connects, but my profile branch head is the single line 
change, (c) above, but I think I need to be amending the commit in 
master, which is the combination of the three commits.

I'm wondering if what I actually did yesterday was incorrect, as my 
branch seems wrong now.

Perhaps I should hold off until the current commits are eventually 
pushed?  The problem with the connects is pretty unlikely to show up in 
real life.

Allan






More information about the KMyMoney-devel mailing list