1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<freqmod> does anybody know how to merge change 301 in to change 300
<freqmod> gerrit told me to squash my commits when i tried to commit to the 300-change :(
<-- amayer (~amayer@mail.weberadvertising.com) har forlatt #rockbox
<-- webguest25 (~ad382815@www.haxx.se) har avsluttet (Quit: CGI:IRC (EOF))
<-- einhirn (~Miranda@bsod.rz.tu-clausthal.de) har avsluttet (Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)
<gevaerts> Zagor: have you had time to look at the manual issue yet?
<Zagor> unfortunately, no
<gevaerts> freqmod: I *think* "git reset <last-commit-id>" will remove that commit while leaving the changed files alone, so they're ready to commit again, and then git commit --amend will let you change the "new" latest commit. I'm not at all sure if that's the best way though
<kugel> freqmod: then squash the commits :p
<kugel> check out a new branch (from master) and merge --squash the commits into it
<kugel> just make sure you preserve change-id line of the first commit
<kugel> however gevaerts way will also work
<gevaerts> Well...
<gevaerts> My way will work if your commits are all at the top
<gevaerts> If not, you'd have to rebase -i first
<gevaerts> And it won't be very handy with more than one or two commits
...
<freqmod> kugel: how should i squash the commits
<freqmod> i want to have my commit as a separate commit from bertriks commits
<kugel> froggyman: the same way as i described
<kugel> except you don't create the branch from master, but from bertrik's last commit instead
<freqmod> i have a branch based on the last bertrik commit
<freqmod> and push it to /refs/for/master
<kugel> for to merge single commits, it's easiest to do git rebase -i, though. you can nerge the top-most commit by amending to the previous one
<freqmod> i do a rebase -i master
<freqmod> and then i squash all commits except the one at the start of the file?
<-- saratoga (98032909@gateway/web/freenode/ip.152.3.41.9) har avsluttet (Ping timeout: 245 seconds)
<kugel> no, you want to keep bertrik's ones as is
<freqmod> why do i need to squash at all then?
<freqmod> i have only one commit which i want to add to the change
<kugel> i thought you wanted your changes as a single commit on top of bertrik's ones
<kugel> or do you want them merged with bertrik's?
<freqmod> i want to apply a patch (one commit) to change 300
<kugel> ah, okay
<kugel> yes then edit all commits except the first one
<-- y4n (~y4n@unaffiliated/y4ndexx) har avsluttet (Disconnected by services)
--> y4n (~y4n@unaffiliated/y4ndexx) har blitt med i #rockbox
<kugel> for each rebase step simply do "git commit -va --amed"
<kugel> amend*
<freqmod> if i try to squash all the commits except the first one i get an horrible merge conflict of all the files
<freqmod> (using rebase -i)
<kugel> ?
<kugel> do a plain "git rebase master"
<kugel> before that make sure that master is up-to-date
<freqmod> there i got a clean rebase
<freqmod> i had some work done on the local master branch
<kugel> alright, now retry the rebase -i
<freqmod> ok, rebased
<freqmod> there it work
<freqmod> thanks for helping me to untangle my version control mess
<freqmod> now i only have to verify it still works after all the merging
<freqmod> :P
--> MethoS- ([email protected]) har blitt med i #rockbox
<freqmod> btw i wrote a codec 2 interface for decoding codec2 in rockbox
--> TheLemonMan ([email protected]) har blitt med i #rockbox
<-- TheLemonMan ([email protected]) har avsluttet (Changing host)
--> TheLemonMan (~LemonBoy@unaffiliated/thelemonman) har blitt med i #rockbox
<freqmod> but no fixed point of codec2 exsits yet so it does only work in the simulator with an hack to link with libm
--> bertrik ([email protected]) har blitt med i #rockbox