Activity Team/Git Activity Maintainer Walkthrough

Cast of this drama:
 * bernie is advisor,
 * godiard is new maintainer of paint activity,
 * Quozl is contributor who has a repository with edits to be merged.

godiard has to merge the contributions and then push.


 *   godiard: then, regarding your second question, you'll need some git-fu. let me know when you're ready
 *   godiard: I'll guide you through the process
 *   bernie: ok
 *   bernie: from comandline or from git.slo ?
 *   godiard: cmdline
 *   godiard: first of all, clone the mainline repo. perhaps you've done this already
 *   godiard: if you did use the git:// url for the initial checkout, you may have to update your configuration to use the ssh url
 *   godiard: otherwise, you won't be able to push
 *   bernie: sorry, where is the ssh url?
 *   godiard: you can see it in the repo page
 *   bernie: i do git clone git://git.sugarlabs.org/paint/mainline.git
 *   godiard: it's the third one
 *   godiard: ok, if you did "git clone git://...", you can't push. the git:// protocol is unauthenticated and hence read-only
 *   git push gitorious@git.sugarlabs.org:paint/mainline.git ?
 *   godiard: the url can be fixed afterwards by editing .git/config or, if you prefer to go by the rules, with the "git remote" command
 *   godiard: oh, this is another way to achieve it
 *   godiard: it's more inconvenient, though... you'd have to type the url every time you want to push.
 *   bernie: trying
 *   bernie: but i need to do the clone before the git remote
 *   godiard: oh, I thought you had done a clone already... I was trying to save you time by changing the url in the existing repo
 *   bernie:ok
 *   godiard: to answer your question: yes, git remote works from within an existing repo (which may be also a totally empty repo created with "git init")
 *   bernie: ok
 *   godiard: ok, once you have a repo checked out and the url is the ssh one, we may proceed.
 *   godiard: ok, once you have a repo checked out and the url is the ssh one, we may proceed.

> Quozl:< git is so hard for newbies...
 *   bernie: i started again in another directory
 *   bernie : i cloned mainline with git clone git://git.sugarlabs.org/paint/mainline.git
 *   bernie: in the page i don't found any ssh url
 *   godiard: odd... do you see your name on the right?
 *   godiard: are you logged in?
 *   bernie:yes
 *   godiard: you only see "Public clone url" and "HTTP clone url" ?
 *   godiard: are you looking here? http://git.sugarlabs.org/projects/paint/repos/mainline
 *   bernie: yes and push url
 *   godiard: aha! that's the ssh url
 *   ouch
 *   godiard: (sorry, I don't see what you see because I don't have commit access to paint)
 *   but when i do "git remote add origin gitorious@git.sugarlabs.org:paint/mainline.git"
 *   godiard: so, since you checked out the git:// again, you'll have to edit .git/config and replace the url with this one
 *   i have "fatal: Not a git repository (or any of the parent directories): .git"
 *   godiard: odd
 *   bernie: i must do git init before git remote?
 *   godiard: are you into the checkout dir?
 *   hey, re: standard cursors
 *   godiard: if you did git clone .../mainline.git, your repo is probably in a dir called "mainline"
 *   ok
 *   cd mainline
 *   godiard: i have a feeling that "git remote add ..." will fail again because you already have an origin configured now
 *   godiard: for this case, new versions of git offer a command: "git remote set-url origin gitorious@git.sugarlabs.org:paint/mainline.git"
 *   try git remote in mainline?
 *  bernie: don't forget the opportunity to have godiard show you his .git/config
 *   godiard: git remote is kind of hard to use... this is why I was suggesting editing .git/config instead :-)
 *   ok
 *  "git remote" is another interface to the file .git/config
 *   godiard: all the command does is change that file
 *   ok, i am editing the file
 *   i see a url parameter
 *   git has plenty of UI sugar commands nowadays. the intent was to make it easier to use, but in my mind they made it more obfuscated.
 *   bernie:i must change "git" by "gitorious"  ?
 *   like the "friendly" error messages with a dozen lines of justification for not doing what you wanted to do :-)
 *   godiard: you've got to change the entire url to  gitorious@git.sugarlabs.org:paint/mainline.git
 *   bernie: ok
 *   godiard: note, it's easy to miss that this url has a ":" where the old one had "/".
 *   godiard: a few days ago someone wasted a day because of this :-)
 *  godiard: here is my .git/config where i commit to a non-mainline paint repo.
 *  godiard: here is my .git/config where i commit to a non-mainline paint repo.

[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git://git.sugarlabs.org/paint/mainline.git [remote "quozl"] fetch = +refs/heads/*:refs/remotes/origin/* url = gitorious@git.sugarlabs.org:paint/quozl.git [branch "master"] remote = origin merge = refs/heads/master [push] default = matching
 *   can i acomment with # ?
 *   godiard: yep
 *  godiard: just so you see how other paint users use it.
 *  godiard: in my case i fetch from mainline and push to quozl.git
 *   bernie: why are we suddenly having this / vs : problem?
 *   godiard: now you should be able to do "git pull"... it will tell you that there's nothing new in the remote
 *   quozl: thanks
 *   walterbender: one is a real url (git://host/path)
 *   walterbender: the other is an ssh address in the form  user@host:path
 *  bernie: isn't there a URL form of the SSH address?
 *   bernie: git pull ok!
 *   walterbender: for symmetry, git also supports an ssh://user@host/url  syntax similar to svn... but it's rarely used
 *   Quozl: yep ^
 *   godiard: ok, now I'll let you see around your repo so you gain confidence
 *   godiard: first of all, I recommend looking at the history: git log
 *   bernie: ok, i see the same
 *   godiard: for each commit, it will tell you who did it, when and hopefully also why
 *   godiard: to see even the patches, try "git log -p"
 *  godiard: by the way, you can also test the effects of what you are about to do to mainline on git.sugarlabs.org ... by cloning that repository to your system, e.g. /tmp, and then pushing your changes to it and examining the effect.
 *   godiard: oh yeah, this is a good way to experiment without breaking anything in the server
 *  (e.g. pushing changes from your local clone that you want to keep, to a local clone that you have only for testing a push).
 *   godiard: an important concept to grasp in git is that your repo is only yours and you can mess it as much as you like. all your commits will remain local.
 *   godiard: until you do a "git push", or course.
 *   bernie: ok
 *   bernie : i can do a rollback?
 *   godiard: every time you do a clone, it's an entire copy of the other repo and you can use it as the url for another clone and so on
 *   godiard: yes, git has very powerful commands for undoing changes in many ways
 *   godiard: "git reset", "git commit --amend"... it's almost unconfined because... the repo has only one user: you.
 *   bernie:ok
 *   godiard: ok, now look at what branches you have: git branch -a
 *   godiard: you'll see a * next to the current one
 *   godiard: it will probably be "master"
 *  godiard: instead of rollback (as a concept), you can just checkout the hash before your commit, make your changes again, and commit again.
 *   ok
 *  git repo is a series of alternate realities.
 *  sometimes those alternate realities merge back together, but they don't have to unless you want them to.
 *   godiard: now it's time for some rock & roll. add another remote: git remote add quozl git://git.sugarlabs.org/paint/quozl.git
 *   ok
 *   godiard: now you can fetch the stuff that quozl did in his repo
 *   godiard: are you planning to merge everything?
 *   quozl: i think so, any problem?
 *  i suggest you consider rewriting some of the commit messages before you push.
 *  some of the commit messages are unduly brief and don't include what we learned in mail threads.
 *   Quozl: good idea... we'll use it as an excuse to show godiard how to do these advanced things too
 *   godiard: ok, now the easiest and most non-destructive thing you could do is "fetch" from quozl repo
 *   godiard: like so: git fetch quozl
 *  i'll do what godiard is doing too, so that i can learn.
 *   godiard: "fetch" is a bit like clone, but you use it in an existing repo and it downloads only the objects that you don't already have.
 *   bernie: ok, now i have the quozl remotes when i do "git branch -a"
 *  works for me.
 *   godiard: hehe, you anticipated me this time!
 *   godiard: ok, now you could look at what quozl has done in his repository: git log quozl/master
 *   godiard: I'm assuming that quozl also had a branch called "master", like you do
 *   godiard: because "master" is the name for the main branch in git, many repositories have it. but it's not obligatory
 *   bernie: yes, i see my changes
 * <Quozl> godiard: here ... shows me cloning mainline, adding my repo, fetching from my repo, and checking remote.

$ cd /tmp $ git clone git://git.sugarlabs.org/paint/mainline.git paint.git Initialized empty Git repository in /tmp/paint.git/.git/ remote: Counting objects: 1480, done. remote: Compressing objects: 100% (599/599), done. remote: Total 1480 (delta 832), reused 1409 (delta 789) Receiving objects: 100% (1480/1480), 503.23 KiB | 108 KiB/s, done. Resolving deltas: 100% (832/832), done. $ cd paint.git $ git remote add quozl git://git.sugarlabs.org/paint/quozl.git $ git fetch quozl remote: Counting objects: 66, done. remote: Compressing objects: 100% (48/48), done. remote: Total 48 (delta 26), reused 0 (delta 0) Unpacking objects: 100% (48/48), done. From git://git.sugarlabs.org/paint/quozl * [new branch]     master     -> quozl/master * [new branch]     trial-3    -> quozl/trial-3 $ git remote -v origin git://git.sugarlabs.org/paint/mainline.git (fetch) origin git://git.sugarlabs.org/paint/mainline.git (push) quozl  git://git.sugarlabs.org/paint/quozl.git (fetch) quozl  git://git.sugarlabs.org/paint/quozl.git (push) $
 *   godiard: aren't the first commits different from the ones in mainline?
 * <Quozl> godiard: e430f2742f910d16a59318060bd39fc80e37822b for example has wrong author.
 *   Quozl: hehe, we can fix that :)
 * <Quozl> bernie: there are two lines of descent ... there were a few patches that Gonzalo sent before e-mail address was correct, such as 125a5dc57ab03bb8ac22cbcf259ede6b6857a338.
 *   yes
 *   Quozl: ah I see
 *   godiard: ok, let me know when you feel ready for the next wave of distributed version control theory :)
 *   tell me
 *   my wife is calling me to dinner :)
 * <Quozl> godiard: after cloning mainline.git and fetching quozl.git, the result is a repo that contains the patches but is currently showing files representing mainline.git's status.  fetch doesn't change the files, it only grabs patches.
 * <Quozl> ah, bad time.
 *   godiard: ok, now normally one would do (don't do it!): git merge quozl/master
 * <Quozl> always pre-empt git with wife.  long learning.
 *   godiard: this would do a so-called merge between your history and his history
 *   godiard: it would look like this:

A---B---C topic /        \                 D---E---F---G---H master


 *   godiard: (the line between C and H is what  the merge does)
 *   ok
 *   godiard: this is very stupid and even cvs and svn could do it
 *   godiard: but we want to do more
 *   godiard: we want to do something called a "rebase"
 * <Quozl> the problem with doing "git merge quozl/master" at this point is that all of my mistakes in history are simply copied into mainline.
 *   Quozl: exactly!
 *   quozl: aha
 * <Quozl> copying my bad history into mainline makes mainline history harder to read.

> walterbender:< are you enjoying the git class too? :-)
 *   godiard: the rebase would take the old history that looked like this:

A---B---C topic /                D---E---F---G master


 * <Quozl> godiard: the history of change to code is almost as valuable as the code itself, sometimes.
 *   godiard: and change it to a new history that looks like this:

A´--B´--C´ topic /                D---E---F---G master


 * <Quozl> (quozl.git is topic?)
 *   godiard: take your time to see what is happening :)
 *   Quozl: yep
 *   bernie: ok
 *   Quozl: and yep, the history is important... maybe not in a small activity, but it's very important in a project the size of sugar
 *   bernie: i will to print this and read many times :)
 * <Quozl> godiard: you must go to dinner now?
 *   godiard: ok, git can do this almost automatically. sometimes it will need your help because A, B, C changed the same lines of E, F, G...
 *   godiard: I can suggest some cool git tutorials and docs
 *   bernie: this time is easy, mainline didn change
 *   godiard: anyway, after all the theory, all you need to do is: git rebase quozl/master
 *   godiard: WHAM! you have rebased
 *   bernie: yes, i need read more
 *   bernie: i can do it now?
 *   godiard: you could, but you would make a small mistake. I did it... so you can do it too and I'll show you how to remedy
 *   First, rewinding head to replay your work on top of it...
 *   Fast-forwarded master to quozl/master.
 * <Quozl> works for me too, but it looks the same in gitk.  what is the difference?
 *   godiard: ok, now look at the history... you have all the changes that quozl had done!
 *   yes


 * tinker-f595 has quit (Quit: tinker-f595)
 * <Quozl> (including that double line of descent around #931 #1902 and #1015)
 *   Quozl: now all of your changes are also on the local master branch
 *   then i must do push?
 *   godiard: ok, here's the mistake: we forgot to change all the commits to adjust the author and logs!
 *   aha
 *   i can do it in the local repo?
 *   Quozl: oh yeah, I see it. fixing it would require a little more work


 * chrowe has quit (Quit: chrowe)
 *   godiard: yes, first we need to undo the rebase
 *   godiard: I promised git can undo anything, but how can this be done?
 *   bernie and quozl: sorry can we continue in 1 hour?
 *   godiard: if you remember what the first commit was before the rebase, you can return to it with "git reset --hard <commit-ish> "
 *   godiard: sure
 *   godiard: see you later


 * godiard: ok, so... where were we?
 * bernie: we need to correct old commits
 * godiard: oh yes. first, we'd better undo the mistake of rebasing with no change
 * godiard: I mean, the mistake of rebasing without editing the interim commits
 * bernie: ok git reset ?
 * godiard: in order to do this, meet the multiple-undo log of git: git reflog
 * godiard: this will show you the last operations that changed the repo
 * bernie: ok
 * bernie: i have one checkout and one clone
 * <Quozl>	i have a clone of mainline.git to which i did a fetch of quozl.git then a rebase quozl/master.
 * <Quozl>	i see, yes, reflog shows one checkout (most recent) and one clone (least recent).
 * Quozl: reflog sometimes does not show the exact operation you did. in this case, the checkout is the rebase
 * <Quozl>	here is the reflog output.

e4e1d7a HEAD@{0}: checkout: moving from master to e4e1d7a25550594f6c8d745203f1c110da400c26^0 3fb9bd6 HEAD@{1}: clone: from git://git.sugarlabs.org/paint/mainline.git

Jun 09 14:07:40 	Quozl: the fact is that this rebase was kind of a fake rebase because nothing happened on mainline after you created your branch Jun 09 14:08:52 	bernie: ok Jun 09 14:14:16 	godiard: so, are you back to a history in which the rebase was not done? Jun 09 14:15:16 	bernie: i don think so Jun 09 14:15:20 	i have Jun 09 14:15:20 	godiard: you can ensure about it by doing: git log --pretty=oneline Jun 09 14:16:15 	bernie: i see the commits to quozl repo Jun 09 14:16:46 	when i do "git reflog" Jun 09 14:16:48 	i have Jun 09 14:16:51 <Quozl>	bernie: you only got us to do git reflog. Jun 09 14:16:56 	e4e1d7a HEAD@{0}: checkout: moving from master to e4e1d7a25550594f6c8d745203f1c110da400c26^0 Jun 09 14:16:56 	3fb9bd6 HEAD@{1}: clone: from git://git.sugarlabs.org/paint/mainline.git Jun 09 14:17:01 <Quozl>	bernie: you didn't say to do anything after that. Jun 09 14:17:29 *	Quozl imitates an obedient puppy Jun 09 14:17:38 	:) Jun 09 14:18:27 	godiard: ah, ok you need to reset Jun 09 14:18:37 	godiard: like this: git reset --hard HEAD@{1} Jun 09 14:18:53 	Quozl: you're right :) Jun 09 14:19:02 	ok! Jun 09 14:19:17 	HEAD is now at 3fb9bd6 Commit from Sugar Labs: Translation System by user Clytie.: 57 of 57 messages translated (0 fuzzy). Jun 09 14:19:19 <Quozl>	so, a "reset" doesn't change files, but does change the repository's belief in historic position. Jun 09 14:19:43 <Quozl>	ah, the --hard is different. Jun 09 14:19:53 	godiard: the HEAD@{1} is a special syntax meaning "whatever was at HEAD, but 1 step back in time (i.e. undo one thing from the reflog) Jun 09 14:20:12 	bernie: ok, --hard change files? Jun 09 14:20:20 	Quozl: yeah, hard does both the repository and the files. so you keep things consistent Jun 09 14:20:31 <Quozl>	bernie: why would you not "git checkout HEAD@{1}" instead? Jun 09 14:20:53 	Quozl: sometimes you want to do only the repo and not the files, so you can keep the changes and redo your commit in a different way Jun 09 14:21:19 <Quozl>	bernie: how different is "git checkout HEAD@{1}" from "git reset --hard HEAD@{1}" ? Jun 09 14:21:24 	Quozl: if you did "git checkout HEAD@{1}" you'd get your files to the previous state, but the history would remain unaltered Jun 09 14:21:42 	Quozl: checkout changes local files, not the repository Jun 09 14:22:17 <Quozl>	bernie: but isn't the history still there in the repository and reachable with a "git checkout HEAD@{1}" now? Jun 09 14:23:21 	Quozl: you're not thinking quadrimensionally, marty! Jun 09 14:24:02 <Quozl>	bernie: so "git reset --hard HEAD@{1}" actually destroyed history? Jun 09 14:24:05 	Quozl: there are 3 distinct things: Jun 09 14:24:21 	Quozl: 1) the files in your sandbox. they can be the same of any revisions, or they can be changed by you with a text editor Jun 09 14:24:53 <Quozl>	1) the files in your sandbox ... would have been changed by "git checkout HEAD@{1}" and by "git reset --hard HEAD@{1}", right? Jun 09 14:24:57 	Quozl: 2) the revisions in your history... the current branch, other branches and all the remote branches you like Jun 09 14:25:29 <Quozl>	2) the revisions in your history ... both commands appear to move current point in history to a point that omits the revisions that were previously there, right? Jun 09 14:26:04 	Quozl: 3) this is the magic: the repository can contain any number of revisions which don't even show up in any branch! these may have become unreachable as a result of a "destructive" operation such as reset or rebase Jun 09 14:26:24 <Quozl>	bernie: unreachable unless you know the hash, or read reflog, right? Jun 09 14:26:46 	Quozl: to answer your (1), yes, both commands would have changed the regular files in your sandbox Jun 09 14:27:38 	Quozl: to answer (2), both move your sandbox in time, but one (reset) also *changes* the timeline: -) Jun 09 14:28:09 	Quozl: you can rewrite history in git in such a way that some commits no longer exist, or even happen in different orders! Jun 09 14:28:51 <Quozl>	bernie: i can't see the difference between reset and checkout ... change the timeline ... you mean the log of patches, or something else? Jun 09 14:29:18 	Quozl: to answer your last question about reachability: yes, if you remember the hash you can recover any odd revision... and the reflog helps you remember the last N hashes where your HEAD was pointing to Jun 09 14:29:57 	Quozl: yes, the log... you would no longer see the same stuff in the log after a reset Jun 09 14:30:20 	Quozl: a checkout, insteead, will just... check-out the stuff from a particular point in the log and not touch the log itself Jun 09 14:30:36 	godiard: I hope we have confused you enough by now :-) Jun 09 14:31:04 	bernie: i am trying to understand :) Jun 09 14:31:07 	bernie: you can only push those things if your remote isn't configured to deny non-fastforwards though Jun 09 14:31:12 	(as most remotes are starting to be) Jun 09 14:32:51 	cjb: in the general case of history reweite, you'd be right... but I won't make godiard change anything before origin/master so the remote git won't notice any anomaly in the space-time continuum Jun 09 14:33:07 	godiard: I hope this is perfectly clear :-) Jun 09 14:33:14 <Quozl>	bernie: i've just done a test ... clone, remote add, fetch, rebase ... and in one repo i did reset --hard HEAD@{1} and in the other i did checkout HEAD@{1} ... and looking at both repos with gitk i can't see any difference in history or sandbox. Jun 09 14:34:09 	godiard: if not, cfr. On The Electrodynamics of Moving Bodies, Albert Einstein Jun 09 14:34:12 <Quozl>	bernie: so please proceed with godiard and i'll do the same actions godiard does but in two repos; one with reset, one with checkout, so i can understand. Jun 09 14:34:46 	Quozl: k Jun 09 14:35:10 	bernie: it is too simple to quozl :), but for me its ok Jun 09 14:35:10 	godiard: ok, did you reset your tree? Jun 09 14:35:17 	yes Jun 09 14:35:47 	godiard: now you can happily do the "usual" thing a maintainer would do to merge someone else's repo: git merge quozl/master Jun 09 14:36:08 	godiard: this will show pretty stats... even in color if you enabled it in your ~/.gitconfig Jun 09 14:37:18 	Quozl, godiard: this is my ~/.gitconfig in case someone wants to beautify their git environment: http://people.sugarlabs.org/bernie/.gitconfig Jun 09 14:37:40 	Quozl: there's a record 78 from dsd? Jun 09 14:37:44 	Quozl: is it in aslo? Jun 09 14:38:31 	bernie: git log show all the changes again Jun 09 14:38:35 <Quozl>	bernie: http://dev.laptop.org/~dsd/record/Record-78.xo ... i don't know if it is in aslo, i don't know how to get a list of what is in aslo, sorry. Jun 09 14:39:09 	bernie: the changes are in my local repo or in the remote repo now? Jun 09 14:39:19 	godiard: ok, now we start editing them one by one Jun 09 14:39:33 	bernie: ok, how? Jun 09 14:39:40 <Quozl>	godiard: they are only local, you can verify that by comparing "git log" locally with git.sugarlabs.org via web browser. Jun 09 14:39:42 	godiard: to do this, we use rebase again... but this time we make it.... INTERACTIVE! Jun 09 14:39:45 	ta-da! Jun 09 14:40:24 	godiard: and we do the rebase against origin/master, so that our history will look nice against it, with no merges and no crap in the middle. only good patches. Jun 09 14:40:32 <Quozl>	but how? Jun 09 14:40:36 	bernie: you are enjoying it ... Jun 09 14:40:45 <Quozl>	while we must suffer. ;-) Jun 09 14:41:00 	dsd_: is Record-78 in aslo? and is the code in the same repo where m_anish_ has been working? Jun 09 14:41:33 	godiard: yup :) Jun 09 14:41:57 	godiard: so, the exact command should be: git rebase --interactive origin/master Jun 09 14:42:50 	godiard: this is a very common comand for the contributor workflow. it's even available as a shortcut when you pull: git pull --rebase Jun 09 14:44:03 	godiard: after you issue that command, git will bring up your favorite text editor. don't exit yet, look at it for a while Jun 09 14:44:28 	bernie: i look Jun 09 14:44:46 	bernie: one line by commit, first word its a cvommand Jun 09 14:45:39 	godiard: exactly. you can replace the "pick" with "edit" for each commit you'd like to change Jun 09 14:46:02 	godiard: you could do crazy things with this, but we'll just change the authors here and there Jun 09 14:46:15 	bernie: the comment must be in the same line? Jun 09 14:46:28 	Quozl: there might be a conflict at some point due to your branch & merge Jun 09 14:46:37 	bernie: i don't see the authors Jun 09 14:47:03 	godiard: oh, that comes later. now you just say "edit" where you want to make a change.. Jun 09 14:47:28 	godiard: you can also swap some commits. this will make the commits appear in that order in the final log Jun 09 14:47:50 	godiard: if you remove a line, then that commit will be lost Jun 09 14:47:55 <Quozl>	(bernie: the branch and merge were *caused* by doing an interactive rebase where authors were changed. i think my mistake was to include the whole set in a push.) Jun 09 14:48:28 	godiard: it would be useful if some of quozl patches were crap you didn't want to merge. but it'snot the case. Jun 09 14:48:51 	Quozl: git is forgiving Jun 09 14:49:22 <Quozl>	87aa is a rewrite of a59d. Jun 09 14:49:36 	Quozl, godiard: now it's up to you two to decide which patches need editing... which ones to drop, etc. I don't know the code. Jun 09 14:50:04 	bernie: ok, i selected one to change the author Jun 09 14:51:08 	bernie: i must select all now? Jun 09 14:51:22 	godiard: yes... and no Jun 09 14:51:33 <Quozl>	bernie: how can one patch at a time be done? Jun 09 14:51:35 	godiard: if you forget some, you'll always be able to do another rebase later Jun 09 14:52:04 	Quozl: hehe, you'll see... it's a multi-step process. Jun 09 14:52:10 <Quozl>	so i'm dorpping a59d, 125a and 76e7. Jun 09 14:52:15 <Quozl>	so i'm dropping a59d, 125a and 76e7. Jun 09 14:52:41 	Quozl: and also editing a few others? Jun 09 14:53:34 <Quozl>	godiard: e430 is really yours and mine together; your idea, my rewrite. Jun 09 14:53:50 	quozl: it's ok Jun 09 14:54:11 <Quozl>	some of the commits don't have bug number in commit first line. Jun 09 14:54:45 <Quozl>	50d3 and b476 need author e-mail fixed. Jun 09 14:55:51 *	bernie sits back and enjoys Jun 09 14:56:48 	quozl: its true Jun 09 14:57:04 	bernie: can i change the commment here? Jun 09 14:57:18 <Quozl>	godiard: you change comment by using the word "reword". Jun 09 14:57:48 	godiard: it's useless, you'll be able to change the comment at a later step Jun 09 14:57:48 <Quozl>	the two "changing cursors" commits could be squashed. Jun 09 14:58:11 	godiard: comments are usually multiline... the comment here is just a reminder to identify the patch Jun 09 14:58:32 	berni: ok Jun 09 14:58:35 	godiard: just mark the patches you'd like to edit as "edit" now Jun 09 14:58:44 	bernie: ok Jun 09 14:58:59 	Quozl: when you're done, please send a pastebin with your final status Jun 09 14:59:43 <Quozl>

edit b47608b fix #1015 edit 50d3f86 fix #1902 pick 87aabba fix #931 pick 04a9bd1 turn off activity sharing #1863 pick 92a83e5 move free form tool pick e430f27 use cursors from Sugar theme pick fde3dae changed cursors squash 4a60d01 changed cursors pick 0516bbb fix OLPC #296 pick e4e1d7a fix OLPC #3695

Jun 09 15:01:08 	quozl: ok Jun 09 15:01:32 	Quozl: no edits needed? Jun 09 15:01:37 	yama: hola Jun 09 15:01:46 <Quozl>	bernie: there were edits there, missed them? Jun 09 15:02:29 	Quozl: oh yeah, now I see them Jun 09 15:03:25 <Quozl>	bernie: so when should godiard and i exit this editor of interactive rebase? Jun 09 15:03:34 	godiard, Quozl: ok, I think we're all on the same page now. I'll save and exit Jun 09 15:03:50 	(my vim nicely colors the git rebase syntax, I'm amazed) Jun 09 15:04:43 	bernie: ok, and now? Jun 09 15:04:50 <Quozl>	but how to change author? git commit --amend --author? Jun 09 15:05:03 	godiard: ok, now git will apply the first few patches and stop at the first "edit" patch Jun 09 15:05:27 	bernie: with git commit ? Jun 09 15:05:34 <Quozl>	Stopped at b47608b... fix #1015 Jun 09 15:05:42 	godiard: this is your special opportunity to edit _anything_ you want: move files around, change the content of files, etc... Jun 09 15:06:06 <Quozl>	git commit --amend --author "Gonzalo Odiard <godiard@gmail.com>" Jun 09 15:06:26 <Quozl>	oh, so you can make other changes as well and commit? Jun 09 15:06:35 <Quozl>	fascinating. Jun 09 15:06:38 	godiard: because we don't want to do any of this crap, we'll simply say: git commit --amend --author "Gonzalo Odiard <gonzalo@example.com>" Jun 09 15:07:00 	Quozl: hehe you can even split a commit in two this way Jun 09 15:07:26 <Quozl>	bernie: people who don't take the time to review patches often need them split up ... it's like serving porridge. Jun 09 15:07:27 	Quozl: (by doing two commits before issuing the "git rebase --continue" Jun 09 15:07:50 	Quozl: I think git is one of the most amazing development tools ever created Jun 09 15:08:01 <Quozl>	Stopped at 50d3f86... fix #1902 Jun 09 15:08:09 	Quozl: calling it a version control system is diminutive Jun 09 15:08:47 <Quozl>	# This is a combination of 2 commits. Jun 09 15:09:07 	Quozl: this is giving you the opportunity to choose which log message you like the most Jun 09 15:09:13 	Quozl: or merge them Jun 09 15:09:14 <Quozl>	indeed. rebase all done. Jun 09 15:09:51 <Quozl>	bernie: and, for your correction, both repos (one that was reset and one that was wound back with checkout) still look identical even after this history rewrite. Jun 09 15:10:11 <Quozl>	bernie: so i contend that advising checkout is more straightforward than advising reset. Jun 09 15:10:29 	Quozl: next time you're in the middle of a rebase, for some additional fun try: git commit --amend --interactive Jun 09 15:10:38 	Quozl: you can drop individual hunks from patches Jun 09 15:11:23 	bernie: i have a problem Jun 09 15:11:32 <Quozl>	aha, there is a different. gitk says i'm on master for your reset repo, but gitk says yellow icon on the checkout repo, i'm not on master. Jun 09 15:11:37 	Quozl: you mean the files look identical? 'cause the histories should look different Jun 09 15:11:50 <Quozl>	bernie: the history is identical. the tagging is not. Jun 09 15:12:00 	Quozl: ah, I got it Jun 09 15:12:04 	bernie: when i do git rebase --continue Jun 09 15:12:18 	Automatic cherry-pick failed. After resolving the conflicts, Jun 09 15:12:18 	mark the corrected paths with 'git add ', and Jun 09 15:12:18 	run 'git rebase --continue' Jun 09 15:12:18 	Could not apply 76e76d9... fix #1015 Jun 09 15:12:29 	Quozl: because "git log" will show you the history FROM WHERE YOU ARE down... but in the checkout case there's more history *after* where you are. Jun 09 15:12:46 	godiard: strange, I did not get this Jun 09 15:13:01 	godiard: probably you forgot to remove one of the double patches. Jun 09 15:13:04 <Quozl>	bernie: you mean because master in that repo is tied to a commit on another branch of the history. Jun 09 15:13:14 	godiard: that's easy to solve: git rebase --skip Jun 09 15:13:30 <Quozl>	godiard: i did not get this either. perhaps you had different set of patches chosen. Jun 09 15:13:58 	godiard: normally you'd look what needs to be adjusted, fix the conflicts, then "git add" the files you fixed Jun 09 15:14:14 	godiard: this time we don't want the patch so we can simply skip Jun 09 15:14:35 	bernie: how? Jun 09 15:14:59 	godiard: git rebase --skip Jun 09 15:15:11 <Quozl>	godiard: the error you posted says 76e76d9 ... this patch i removed by deleting the line in the rebase editor. Jun 09 15:15:22 <Quozl>	godiard: so just skip it. Jun 09 15:15:31 <Quozl>	godiard: you may get the same for 125 and a59. Jun 09 15:15:40 	Quozl: yeah, 76e76d9 is one of those we wanted to delete Jun 09 15:16:12 	quozl: ok Jun 09 15:16:19 <Quozl>	bernie: so, how do i bring the "master" tag down to my current revised history (in the repo that i used checkout in, unrelated to what godiard is doing) Jun 09 15:16:27 	quozl: Could not apply 125a5dc... fix #1902 Jun 09 15:16:33 <Quozl>	godiard: skip 125. Jun 09 15:16:50 	Quozl: with reset. Jun 09 15:16:57 <Quozl>	bernie: bwahahah. Jun 09 15:16:58 	quozl: i think git did it Jun 09 15:17:05 <Quozl>	godiard: check history with gitk or git log Jun 09 15:17:06 	Quozl: reset is used to... reset where branches point Jun 09 15:18:01 	quozl: i see Jun 09 15:18:14 <Quozl>	"Successfully rebased and updated detached HEAD." is the subtle message I got in my alternate alternate reality. Jun 09 15:18:19 	Quozl: btw, I recommend this excellent article to anyone who wants to work with git beyond svn emulation: http://www.newartisans.com/2008/04/git-from-the-bottom-up.html Jun 09 15:18:29 <Quozl>	i've read it. Jun 09 15:19:47 	godiard: when you're done, you may want to admire the result with: gitk --all Jun 09 15:20:09 	bernie: i did a mistake porbably Jun 09 15:20:40 <Quozl>	bernie: in my alternate reality, "git reset master" was all that was required. by switching master from what it was to this revised history, i've effectively and intentionally lost the old history as far as tagging is concerned. naturally i could get it back with reflog. Jun 09 15:20:44 	bernie: but it s 2 am here Jun 09 15:21:34 	bernie: i will try again tomorrow Jun 09 15:21:37 	godiard: here 1am Jun 09 15:21:51 	godiard: you know how to reset, revert, rebase, retry... :-) Jun 09 15:21:53 <Quozl>	nope, "git reset master" wasn't the right thing to do. Jun 09 15:22:25 	Quozl: no, it's git reset <commit of where you are now> Jun 09 15:22:27 	bernie: i know who knows :) Jun 09 15:22:36 <Quozl>	so there's this willow tree, and i've split a frond half way up, and want to band aid it back on. Jun 09 15:23:04 <Quozl>	bernie: that too does not move master. Jun 09 15:23:19 	Quozl: damn Jun 09 15:23:25 	Quozl: oh, I know why Jun 09 15:23:27 	bernie, quozl: thanks, i see you Jun 09 15:23:31 <Quozl>	godiard: bye. Jun 09 15:23:37 	Quozl: now you're in a weird limbo called "detached head" Jun 09 15:23:41 <Quozl>	godiard: come back for more tomorrow ... for the push. Jun 09 15:23:50 <--	godiard has quit (Quit: Ex-Chat)