| 2009-02-13 |
| → mattenoble_ joined | 00:00 |
| ← LiamH left | 00:01 |
| ← mattenoble_ left | 00:02 |
| ← lu_zero left | 00:03 |
| → program247365 joined | 00:04 |
| ← program247365 left | 00:04 |
| ← manithree left | 00:04 |
|
brink
| If I use git-filter-branch to permanently remove a directory can I still pull from the original repository? | 00:05 |
|
DrNick
| you'll get that directory back | 00:05 |
|
| and the merging will be unpleasant | 00:06 |
| → sporkmonger joined | 00:06 |
| → faithfulgeek joined | 00:07 |
| → icwiener joined | 00:07 |
|
brink
| I just notice that if I delete a directory with git-filter-branch I don't save any space even after git gc. Is there something else I need to do to remove all history of a directory? | 00:08 |
| ← jackdempsey left | 00:08 |
| ← plediii left | 00:09 |
|
gitte
| brink: it's all in the reflogs. | 00:09 |
|
| brink: just make a (temporary) clone to see the size you'll get in due time. | 00:09 |
| ← jstad left | 00:10 |
|
brink
| gitte: The clone seems to be the same size. Do I need to repack it or something? | 00:11 |
|
gitte
| brink: try it. | 00:12 |
|
brink
| gitte: I just did. No luck. All those binaries must be hidden somewhere. | 00:12 |
|
gitte
| brink: generally, I find that many people are most concerned with the size of the repository after filter-branch, but I'd rather try to make sure that all worked out as expected. | 00:13 |
| ← scientes left | 00:13 |
| ← shad left | 00:13 |
| ← eddyp left | 00:14 |
| → eddyp joined | 00:14 |
|
brink
| gitte: The directories are gone, but the size remains. | 00:14 |
|
gitte
| brink: I was not talking about the working tree when I mentioned the desire for verification. | 00:15 |
| → shad joined | 00:15 |
|
brink
| gitte: Ok. what should I verify? | 00:16 |
|
gitte
| brink: you should know what you wanted to achieve with the filter-branch call yourself :-) | 00:17 |
| → dmlloyd_ joined | 00:17 |
| ← radarek left | 00:17 |
|
brink
| I wanted it to delete all history of a directory. That way all the binary data that shouldn't have been checked in in first place would be removed. | 00:17 |
|
| gitte: Do I misunderstand filter-branch? | 00:18 |
|
gitte
| brink: no, that's what it should be able to do. | 00:18 |
|
| brink: now it is your job to find out if there are references left to those blobs, e.g. by calling "git rev-list --all --objects" and looking for the filenames. | 00:19 |
|
brink
| gitte: I see. It looks like they used to have different names. So they'll be difficult to chase down I assume. | 00:22 |
| ← Sigma left | 00:22 |
| ← dmlloyd left | 00:23 |
| dmlloyd_ → dmlloyd | 00:23 |
|
gitte
| brink: See? Much more sense to verify what was achieved than to look at the size... :-) | 00:23 |
|
brink
| gitte: Yes. Unfortunately, it looks like it will be difficult to track down all the unecessary binaries because they've been moved all over the place. | 00:24 |
|
gitte
| brink: maybe you want to think about better ways to identify what blobs to remove than the absolute path? | 00:25 |
|
brink
| gitte: Can they be identified by some other id? They never change their contents. | 00:26 |
| ← icwiener left | 00:27 |
|
gitte
| brink: if you know the exact contents, you might want to identify them by their hash. | 00:28 |
|
| elg wonders why vimdiff is preferred over opendiff (osx) when vimdiff is so pitiful for 3-way merges | 00:28 |
|
gitte
| brink: other than that, you could make a tree-filter (expensive; you want to use a RAM disk for that) that searches for files larger than a certain threshold, and delete them. | 00:29 |
|
| brink: you could try to find out what directory names they had, or extension, or if there is another tell tale. | 00:29 |
|
brink
| gitte: I suppose that wouldn't be hard for an individual file. There are a number of them though. | 00:30 |
|
| gitte: Assuming I hashed them is there a way to remove all history of a file using its hash? | 00:30 |
|
gitte
| brink: I'd probably use an index filter for that. | 00:30 |
| ← RoPP left | 00:33 |
| → ideogon_ joined | 00:33 |
| ← sporkmonger left | 00:33 |
| ← boto_ left | 00:34 |
| ← Phlogi left | 00:34 |
| → ideogon__ joined | 00:36 |
| dwmw2 → dwmw2_gone | 00:39 |
| → kennethlove joined | 00:40 |
| → stathis_ joined | 00:42 |
| ← shawn-p left | 00:43 |
| ← stathis_ left | 00:44 |
| → maali joined | 00:44 |
| ← ideogon left | 00:47 |
| ← cgardner left | 00:48 |
| → sporkmonger joined | 00:49 |
| ← bradly left | 00:49 |
| ← eean left | 00:49 |
| ← sporkmonger left | 00:49 |
| → eean joined | 00:50 |
|
brink
| gitte: I suppose I could look up the commits and skip those. Does that make sense? | 00:50 |
| ← bdiego left | 00:50 |
|
gitte
| brink: not really, as the commits are not the patches. | 00:50 |
|
| brink: commits in Git are snapshots, so if you skip a few commits in filter-branch, but then take some later commit, the files come back almost magically. | 00:51 |
|
| brink: IOW filter-branch != rebase --interactive | 00:51 |
| ← ideogon_ left | 00:52 |
| ← faithfulgeek left | 00:54 |
| → a-priori joined | 00:57 |
| ← elg left | 00:58 |
| ← a-priori left | 01:00 |
| ← shruggar left | 01:00 |
|
mutex
| so if I want to do a test integration between branch A and B | 01:02 |
|
| can I do it on a new branch C, that is a child of either A or B ? | 01:02 |
| → a-priori joined | 01:03 |
| → killerchicken joined | 01:03 |
|
killerchicken
| hey, I just used cherry-pick to pick a patch. It wouldn't apply cleanly. How can I undo everything to be the way before I picked a patch? | 01:04 |
|
parasti
| killerchicken: assuming you didn't have any uncommitted changes, git reset --hard should do | 01:05 |
|
killerchicken
| no, I didn't | 01:06 |
|
| I was wondering if there was anything specific like rebase --abort or something | 01:06 |
|
gitte
| mutex: you can use a throwaway branch C, or you can detach the HEAD, or you can do it on branch A and reset --hard to the pre-merge state afterwards. | 01:06 |
|
| mutex: a matter of taste, really. | 01:06 |
|
| killerchicken: git reset --hard | 01:07 |
|
killerchicken
| gitte: :) | 01:07 |
| ← jboyens left | 01:07 |
|
nomis
| is it possible to specify a fake date when committing stuff? | 01:08 |
|
gitte
| nomis: yep. | 01:09 |
|
nomis
| how? | 01:09 |
|
gitte
| nomis: set "GIT_AUTHOR_DATE" and/or "GIT_COMMITTER_DATE" | 01:09 |
|
nomis
| gitte: ah. Thanks. | 01:09 |
|
gitte
| nomis: or something similar... my memory could fail me... | 01:09 |
|
mutex
| gitte: then just merge my integrated branch C at the end to whatever parent I want ? | 01:10 |
|
| nomis ponders adding ancient history to a project. | 01:10 |
| → ben_h joined | 01:11 |
| ← chris2 left | 01:12 |
|
gitte
| mutex: maybe, depends what you really want (i.e. when you want to have your real merge, and between what) | 01:12 |
| ← plediii_ left | 01:12 |
| → pointlessjon joined | 01:12 |
|
mutex
| maybe I'll just go for it | 01:12 |
|
| see if it blows up | 01:12 |
|
| mutex runs to go play with dynamite | 01:12 |
| → faithfulgeek joined | 01:13 |
|
gitte
| Boom | 01:14 |
| ← calin left | 01:16 |
|
mutex
| well that was painless | 01:16 |
|
| 1 line merge conflict | 01:16 |
| → sporkmonger joined | 01:16 |
|
gitte
| mutex: and the best thing: if you activate rerere before you get the conflict, its resolution will be recorded for next time... | 01:17 |
|
mutex
| yeah I haven't played with rerere yet... | 01:17 |
|
gitte
| I have. | 01:17 |
|
| mutex gasps | 01:18 |
|
mutex
| I just hear about how neat it is | 01:18 |
|
| stories really | 01:18 |
| → toxx_ joined | 01:18 |
|
gitte
| The only thing that is not so brilliant is that you sometimes ask yourself "where are the conflicts?" until you realize that they have been resolved already by rerere. | 01:18 |
|
mutex
| I guess you just run it, and everything happens automagically | 01:18 |
|
benn_d
| fatal: failed to write object ... error: unpack failed: unpacker exited with error code | 01:19 |
|
| crap I'm getting a weird error: | 01:19 |
|
gitte
| Well, you still have to add the "unmerged" files after checking that everything went fine. | 01:19 |
|
mutex
| ah | 01:19 |
|
gitte
| benn_d: disk full? lack of write permission? | 01:19 |
|
| In any case, my body just threw an "OutOfEnergy" exception. | 01:20 |
|
| git night! | 01:20 |
| ← gitte left | 01:20 |
| ← ekidd left | 01:20 |
|
benn_d
| yeah ,was a permissions error.. odd | 01:21 |
| ← faithfulgeek left | 01:22 |
| ← Yuuhi left | 01:23 |
|
mutex
| problem with exceptions is sometimes they go uncaught.... | 01:24 |
| ← schierbeck left | 01:25 |
| ← toxx left | 01:26 |
| ← noth left | 01:27 |
| ← toxx_ left | 01:28 |
| → noth joined | 01:28 |
| → EmilMedve joined | 01:28 |
| ← sdboyer-laptop left | 01:28 |
| ← dwave left | 01:29 |
| ← kennethlove left | 01:29 |
| → ajsharp joined | 01:29 |
| ← noth left | 01:29 |
| → noth joined | 01:30 |
| ← a-priori left | 01:35 |
| → hobodave_ joined | 01:37 |
| ← mcella left | 01:37 |
| ← hobodave left | 01:40 |
| → offcent joined | 01:42 |
| ← hobodave_ left | 01:43 |
| ← offcent left | 01:43 |
|
fynn
| git git git | 01:44 |
| → wallerdev joined | 01:47 |
|
wallerdev
| yo | 01:48 |
|
| so i pushed a branch up to a server (C) from computer A, how do i pull that branch down from another computer (B) | 01:48 |
| → gotnone joined | 01:49 |
|
wallerdev
| i pushed it with [1,2,3,4].any?{ |e| puts e ; e } | 01:49 |
|
| err | 01:49 |
|
| i pushed it with git push origin beta:refs/head/beta | 01:50 |
| → elg joined | 01:50 |
|
gotnone
| I have been having a hard time searching for the commands which will revert my local git tree the remote server. Specifically, I want to remove any extra branches and files I may have inadvertently added. I must have poor searchfu. | 01:51 |
| → lu_zero joined | 01:53 |
|
PerlJam
| gotnone: git help branch | 01:53 |
| → Naib_ joined | 01:56 |
| ← ajsharp left | 01:58 |
| → TML joined | 01:58 |
| ← lois[pac] left | 01:58 |
| ← priidu left | 01:59 |
| ← joshdavey left | 01:59 |
| → faithfulgeek joined | 01:59 |
|
TML
| What can cause "! [remote rejected] master -> master (n/a (unpacker error))"? I've been Googling for a while now, and am not finding a lot of useful info. | 01:59 |
|
gotnone
| thanks PerlJam I think I figured out what I needed to do | 02:00 |
| ← Naib left | 02:02 |
| ← pointlessjon left | 02:03 |
| ← hardcorelamer left | 02:04 |
| → a-priori joined | 02:04 |
|
gwoo
| TML: you are not updated? | 02:06 |
|
wallerdev
| oh god | 02:06 |
|
| lol my git repo is probably so messy now, but i got it | 02:06 |
|
TML
| gwoo: git pull | 02:06 |
|
| Already up-to-date. | 02:06 |
|
gwoo
| TML: maybe the remote is corrupted? | 02:07 |
| → eletuchy joined | 02:11 |
| ← faithfulgeek left | 02:14 |
| → zeahok joined | 02:14 |
| ← wallerdev left | 02:16 |
|
TML
| gwoo: It's a bare repo, this is the first time I've checked anything out of it. I made a one line change, and am now trying to push that change back to the bare repo. | 02:17 |
|
gwoo
| oh weird | 02:17 |
| → plediii joined | 02:18 |
| ← edwardam left | 02:19 |
|
TML
| Just to check, I just nuked the repo and the clone, set them back up again, and get the same error | 02:19 |
|
gwoo
| try git-fsck --full | 02:20 |
|
TML
| http://pastebin.ca/1335604 | 02:20 |
|
| gwoo: On the bare? | 02:20 |
|
gwoo
| yeah if you can | 02:21 |
|
TML
| Tried it on both ends, to no avail | 02:21 |
|
gwoo
| hmm | 02:21 |
|
TML
| There was no output 'git fsck' | 02:21 |
| → tjafk2 joined | 02:21 |
|
TML
| s/output/output from/ | 02:21 |
|
gwoo
| http://kerneltrap.org/mailarchive/git/2007/11/9/399929 | 02:22 |
|
| i found this thread | 02:22 |
|
TML
| Thanks, I'll take a look at thsoe | 02:22 |
|
| those, even | 02:22 |
|
gwoo
| git repack remote/origin/master | 02:23 |
|
| that might help too | 02:23 |
| → loincloth joined | 02:27 |
|
TML
| Ah, damnit. PERMISSIONS! | 02:27 |
|
| That's TWICE today. | 02:27 |
|
| gwoo: Thanks. When I was deleting the repo, I was forgetting to chown the files over to the user running git-daemon. | 02:27 |
|
| And I just can't seem to find anywhere that it logs an error on that | 02:27 |
| → theCarpenter joined | 02:28 |
| → faithfulgeek joined | 02:30 |
| ← gaveen left | 02:34 |
| ← faithfulgeek left | 02:34 |
| ← tjafk1 left | 02:34 |
| → kapone joined | 02:36 |
| ← awarrington__ left | 02:36 |
| ← eddyp left | 02:36 |
| → awarrington__ joined | 02:37 |
| ← _slacker__ left | 02:39 |
| → faithfulgeek joined | 02:39 |
| ← amfwrk left | 02:40 |
| → loinclot_ joined | 02:40 |
| → amfwrk joined | 02:40 |
| → loinclo__ joined | 02:43 |
| ← kapone left | 02:43 |
| ← loincloth left | 02:44 |
| → hobodave joined | 02:44 |
| ← Tv left | 02:45 |
| ← ice799 left | 02:46 |
| ← kapone_ left | 02:48 |
| ← zeahok left | 02:48 |
|
gwoo
| TML: funny that was my first guess | 02:48 |
| → dj_ryan joined | 02:48 |
| ← loinclo__ left | 02:48 |
|
gwoo
| but i did not say it, damn | 02:48 |
|
dj_ryan
| so i have a question | 02:49 |
| → gaveen joined | 02:49 |
|
dj_ryan
| is there a way to reset a github remote-branch | 02:49 |
|
| i had a bunch of erronious commits due to ... learning exactly how git push works | 02:49 |
| → plediii_ joined | 02:52 |
| → zaius joined | 02:52 |
|
zaius
| is there a way to split line by line on an interactive add? | 02:52 |
|
| i can only get it down to paragraph sized blocks | 02:53 |
| → loincloth joined | 02:53 |
| ← EmilMedve left | 02:54 |
| ← loinclot_ left | 02:57 |
| → EmilMedve joined | 02:58 |
| ← Flathead left | 02:59 |
|
mugwump
| zaius: use git-gui | 03:02 |
| → loinclot_ joined | 03:02 |
|
mugwump
| it can add individual lines | 03:02 |
| ← servilio left | 03:02 |
|
plediii_
| what is better than using git to do backups with full history? | 03:03 |
| → tro joined | 03:04 |
| ← loincloth left | 03:05 |
|
mugwump
| plediii_: tape? zfs? | 03:05 |
|
| mugwump scrams & | 03:05 |
| → icwiener joined | 03:06 |
|
plediii_
| mugwump: what software for doing tape backup? | 03:06 |
|
mugwump
| real sysadmins use dump | 03:07 |
| ← Cacheaway left | 03:08 |
| → bdiego joined | 03:08 |
|
zaius
| mugwump: i'm only on a console | 03:09 |
|
plediii_
| mugwump: can dump let me restore backup from any point in the history? | 03:09 |
|
zaius
| looks like i can use the editor mode if i upgrade to 1.6 | 03:09 |
|
| anyone know an easy way to upgrade to 1.6 on ubuntu 8.10? | 03:09 |
| ← plediii left | 03:11 |
| ← spearce left | 03:11 |
|
plediii_
| mugwump: the only problem I see with git is the pain involved if what you're backing up contains git repositories | 03:11 |
|
| and rsync's style of renaming changed files is just lame | 03:12 |
| → jony joined | 03:15 |
|
plediii_
| of course other people have already thought of it :-| | 03:17 |
| ← loinclot_ left | 03:18 |
| ← ideogon__ left | 03:20 |
| → cytrinox_ joined | 03:20 |
|
plediii_
| here's what I'm using to to backup my home directory on a remote host. http://rafb.net/p/TX3E6k90.html | 03:22 |
|
| Anyone want to tell me why this is stupid? | 03:23 |
| → AngryElf1 joined | 03:23 |
| ← AngryElf1 left | 03:24 |
| ← elg left | 03:24 |
| ← AngryElf left | 03:24 |
| ← AngryElf_ left | 03:25 |
| → AngryElf joined | 03:25 |
|
MarcWeber
| 1234475693 +0100 Is this a timestamp? (found in .git/logs/refs/heads/branch | 03:25 |
| → wallerdev joined | 03:25 |
|
offby1
| plediii_: seems complex ... I can't tell by looking if it'll actually work | 03:25 |
|
plediii_
| offby1: it seems to work | 03:26 |
|
| although the business with find could be simplified somehow | 03:26 |
|
| i'm sure | 03:26 |
|
offby1
| plediii_: I've got a ton of backup links at http://delicious.com/tucumcari/backup | 03:26 |
|
plediii_
| i feel like i must be missing something obvious though | 03:26 |
|
wallerdev
| okay i seem to have a problemo, i accidentally created a branch refs/head/beta instead of refs/heads/beta, and now i can't figure out how to remove it | 03:27 |
| ← Kbyte left | 03:27 |
|
wallerdev
| i tried this but got: git push origin refs/head/beta | 03:27 |
|
| error: src refspec refs/head/beta does not match any. | 03:27 |
|
offby1
| I suspect it'd be ok to just delete that file | 03:28 |
|
| offby1 glances around nervously. | 03:28 |
|
offby1
| how'd you create it? | 03:28 |
|
plediii_
| offby1: what do you actually use? | 03:29 |
|
offby1
| "tarsnap" and "duplicity". | 03:29 |
|
ben_h
| strange - i just cloned linus' linux-2.6 tree to poke around, and straight after the clone there are about 20 changed-but-not-updated files. | 03:29 |
|
offby1
| But people's backup needs vary greatly | 03:29 |
|
| ben_h: are you using Windows? | 03:29 |
|
wallerdev
| git push origin refs/head/beta | 03:29 |
|
ben_h
| no, Mac OS X | 03:29 |
|
wallerdev
| err | 03:29 |
|
ben_h
| with nontrivial diffs in a bunch of files. | 03:29 |
|
| sensible-looking diffs that is | 03:29 |
|
offby1
| ben_h: weird. | 03:29 |
|
wallerdev
| git push --force origin origin:refs/head/beta is how i created it | 03:30 |
|
ben_h
| obvious code updates - spelling fixes, cleanups, etc | 03:30 |
| ← gaveen left | 03:30 |
|
offby1
| wallerdev: I think you can nuke it with something like "git push origin :refs/head/beta" | 03:30 |
|
| i.e., if your refspec has nothing before the :, that means "nuke this branch" | 03:31 |
|
wallerdev
| thanks offby1 | 03:32 |
|
| worked | 03:32 |
|
| needed the colon i guess | 03:32 |
|
offby1
| ha! | 03:32 |
|
| I will soon earn my Yellow Belt in git-answering | 03:32 |
|
| doener is my mentor | 03:32 |
|
dj_ryan
| sweet | 03:32 |
|
| is there a way to reset a github remote-branch | 03:33 |
|
offby1
| you mean, make it point someplace else? | 03:33 |
|
dj_ryan
| almost, iw ant it to point to a earlier time | 03:33 |
|
| there is a pile of cruft commits that were accidently pushed there | 03:33 |
|
| the commits also got pushed to a different branch | 03:33 |
|
offby1
| I would bet that you could delete it (using the recipe I just gave above to wallerdev) and then recreate it. There's probably a better way, but ... | 03:33 |
|
dj_ryan
| the "theory" was to branch from a point, then later diff to produce a patch for upstream | 03:34 |
| → utnick joined | 03:34 |
|
plediii_
| offby1: thank you | 03:34 |
|
ben_h
| here's a log of the unexpected local changes: http://gist.github.com/63027 | 03:34 |
|
offby1
| ben_h: might your "linux" directory not have been empty before you cloned? | 03:35 |
|
| only explanation I can think of ... | 03:35 |
|
ben_h
| nah - if you look higher in the history, i created the directory just beforehand | 03:36 |
|
| got me stumped | 03:36 |
| → Flathead joined | 03:36 |
|
ben_h
| and check the 'git clone' output - ~/projects/linux/linux-2.6 was definitely created by git like normal, so it should be clean | 03:37 |
| ← cytrinox left | 03:37 |
|
offby1
| crazy | 03:37 |
|
| sounds like that's worth a post to the mailing list. | 03:37 |
|
| fo' sho' | 03:37 |
|
ben_h
| mm good idea | 03:37 |
| → lobolife joined | 03:42 |
| → bronson joined | 03:43 |
| → elg joined | 03:44 |
| ← kukks left | 03:45 |
| ← lobolife left | 03:48 |
| → mlh joined | 03:48 |
|
mlh
| I have a number of file heirachies around that re mostly the same. Can I git init and add one of them then copy the .git to all the others to find the differences? | 03:49 |
|
| It would beat gdiff (doesn't network) and rsync -nvv (doesn't show diffs) | 03:50 |
|
| I know there is _some_ metadata specific to a particular clone, but how important or mangleable is that metadata | 03:51 |
|
MarcWeber
| yes you can. the .git folder contains everything you nded. Hwoeve ryou can also use diff -r $pathA $pathB then | 03:55 |
|
mlh
| diff doesn't network | 03:55 |
|
| MarcWeber: what about the metadata | 03:55 |
|
MarcWeber
| mlh I don't get the problem. You mean copying the .git folder is faster then mounting and comparing using sshfs or such? | 03:56 |
|
| Which metadata. | 03:56 |
| ← a-priori left | 03:57 |
|
mlh
| .git/config will be different if you do a clone rather than do a copy (rsync) | 03:57 |
|
| the url in particular | 03:58 |
| ← drewr left | 03:58 |
|
MarcWeber
| mlh: But all you are interested in is git diff , aren't you? | 03:58 |
|
mlh
| well ... | 03:58 |
|
| at first | 03:58 |
|
MarcWeber
| You an tweak the .git/config manually as well if you konw what you're doing. | 03:59 |
|
mlh
| but I'd like to use them as real git repos if I could. with commits and merges and whatever | 03:59 |
|
MarcWeber
| You cann still add remote location create branches etc | 03:59 |
|
mlh
| yeah it's the if you konw what you're doing" bit that worries me | 03:59 |
|
| Is there any docs on that stuff? | 03:59 |
|
MarcWeber
| Maybe don't diff but jsut use git checkout -b 'new branch'; git commit -am 'initial diff' then | 03:59 |
|
| mlh: What kind of stuff. That's normal git usage. Which knowledge are you lacking? | 04:00 |
|
mlh
| the unknown unknowns :-) | 04:00 |
|
| e.g. I wasn't sure that I could do a commit and have it make sense to git. | 04:01 |
|
MarcWeber
| I think man git-clone does contain the info that you can just copy a git repo instead of using git clone. everything but .git is a working copy. Thus you it doesn' matter wether you move .git or modify the working copy files | 04:01 |
|
Gitbot
| MarcWeber: the git-clone manpage can be found at http://git.or.cz/man/git-clone | 04:01 |
|
mlh
| BUt from what you've written about it looks like I can | 04:01 |
|
| "it doesn't matter" | 04:01 |
|
MarcWeber
| mlh: If you're still unsure you can make small test. Try your use case with 2 files in /tmp | 04:01 |
|
mlh
| so why is the url different. | 04:01 |
|
MarcWeber
| the url in .git/config ? | 04:01 |
|
mlh
| e.g. if I clone it and then do a git ftech in the clone I guess it pulls from the cloned from repo | 04:02 |
|
MarcWeber
| the remote url of origin? | 04:02 |
|
mlh
| whereas if I copied it, the fetch would pull from the common upstream | 04:02 |
| ← aziz left | 04:02 |
|
MarcWeber
| Cause git clone always sets the remote url of default remote location called "origin" to teh repo you cloned from | 04:02 |
|
mlh
| yep. git clone does. and cp -a doesn't. | 04:02 |
|
| so that's one difference. | 04:03 |
| ← elg left | 04:03 |
|
MarcWeber
| mlh: Just rewrite the config so that it fits your needs. There are more minor differences. git clone might create hard hardlinkes (see man page). But they shouldn't affect the final behaviour | 04:03 |
|
mlh
| ok thanks. | 04:03 |
| ← Bass10 left | 04:03 |
| → JohnFlux joined | 04:04 |
|
MarcWeber
| mlh: You can then just do git remote rm origin; git remote add origin $newurl and you're done. If you're really unsure start making a backup of those dirs. What can go wrong then? | 04:04 |
|
mlh
| I think it would be a nice enhancement to git so that it keeps such differing metadata outside of .git --- say in $HOME/.git-data or somesuch | 04:04 |
|
JohnFlux
| Are there any git developers in here? | 04:04 |
|
mlh
| (I know that would introduce other issues though) | 04:04 |
|
JohnFlux
| I want to try to persuade someone to make the error messages more helpful :) | 04:04 |
|
MarcWeber
| mlh: Which kind of meta data? If you have to put such kind of questions you've done above you should read more about git before putting such a request :-) | 04:05 |
|
| JohnFlux: The mailinglist could be a good place to start. Which one is bothering you (I'm not a developer though) | 04:05 |
|
JohnFlux
| MarcWeber: pretty much all of them :-) I think it would help if they listed options to resolve the error that they give | 04:06 |
|
mlh
| MarcWeber: ok. I did look. But couldn't find a canonical categorical list with specificed semantics. Not that I was really expecting such. | 04:06 |
|
| JUst a vague "should be ok" is good enough for now | 04:06 |
|
MarcWeber
| mlh: Thats what I was telling you all the time :-) I told you go on go on.. | 04:07 |
| cpg → cpg|dinner|brb | 04:07 |
|
mlh
| yep. is good. | 04:07 |
|
MarcWeber
| mlh: semantics of the git config? Try man git-config | 04:07 |
|
Gitbot
| mlh: the git-config manpage can be found at http://git.or.cz/man/git-config | 04:07 |
|
JohnFlux
| MarcWeber: 'git checkout master' 'You have local changes so cannot switch branches. Maybe commit your changes: git commit -a or Delete your changes: git rebase --hard" | 04:07 |
|
| MarcWeber: an error message like that would be good :) Listing the options that I have to resolve each problem | 04:08 |
|
MarcWeber
| JohnFlux s/rebase/reset :-) | 04:08 |
|
| JohnFlux: Do you know how to use grep ? Then you could replace those messages by better once and send the suggestions to the mailinglist. | 04:08 |
|
JohnFlux
| MarcWeber: see, even more evidence that the error messages should be useful :) | 04:08 |
|
MarcWeber
| JohnFlux: In this use case you should mention git stash as well | 04:08 |
|
JohnFlux
| MarcWeber: what does that do? :) | 04:09 |
|
mlh
| looks like git-config is about ~/.git-config not somerepo/.git/config | 04:09 |
|
MarcWeber
| git stash = save changes to the git internal memory place "stash" (which is kind of special commit) which you can restore by git apply later on any other commit | 04:09 |
|
mlh
| er cancel that | 04:10 |
| ← theCarpenter left | 04:10 |
|
MarcWeber
| mlh: Both are the same. you can set defaults int ~/.git-config and overwrite them in .git/config. | 04:10 |
|
| done :) | 04:10 |
| → bdimcheff joined | 04:13 |
| → cemerick joined | 04:13 |
|
mlh
| MarcWeber: one thing I'd really like to know but can't really test for is whether .git/... would ever have a self-reference | 04:14 |
| ← markelikalderon left | 04:14 |
|
MarcWeber
| What do you mean by self-reference? | 04:15 |
| ← reprore__ left | 04:15 |
| → moconnor joined | 04:15 |
| → ekidd joined | 04:17 |
|
TML
| .git/hooks/post-update doesn't seem to execute when I do "git commit". I've checked that it has the execute bit set, what else do I need to do? | 04:18 |
| → jstad joined | 04:19 |
| → Tv joined | 04:19 |
|
MarcWeber
| TML try strace -o /tmp/out -f git commit ... Then you'll see that post-update isn't read at all. you should use the post-commit hook for that | 04:21 |
|
halfline
| TML: i once ran into a server where the public_html directory was on a home dir that was mounted noexec. the way I got around it was rm post-update; ln -s /usr/bin/git-update-server-info post-update | 04:21 |
| ← bdiego left | 04:21 |
|
halfline
| grr didn't see the "git commit" part | 04:21 |
|
TML
| MarcWeber: hah..right | 04:21 |
|
| post-update needs to be on the bare repo | 04:22 |
|
| Got it exactly backwards. Thanks. | 04:22 |
| ← wallerdev left | 04:25 |
| ← faithfulgeek left | 04:28 |
|
johnw
| i want to sync up a directory with files from my index. I know that checkout-index can update the changed and new files, but how do I delete the files in this mirror which have only been removed via rm --cache? | 04:28 |
|
| git clean? | 04:29 |
| → h0nk joined | 04:29 |
|
Tv
| johnw: reset --hard? | 04:29 |
|
johnw
| oh, no, that needs a .git dir in that directory | 04:29 |
|
Tv
| nothing needs .git in a specific directory, --git-dir is for that | 04:29 |
|
johnw
| i'm trying to maintain an external DIR as an "image" of my cache | 04:29 |
|
| but I don't want to rm -fr and recreate it every time | 04:29 |
|
Tv
| why not just have a clone, then? | 04:30 |
|
johnw
| i'm doing this to make a better pre-commit hook | 04:30 |
|
Tv
| local clones are cheap | 04:30 |
|
johnw
| because I can't push an index | 04:30 |
|
| checkout-index won't remove files | 04:31 |
|
| i guess i can parse the output from git clean -n to find out what should be removed | 04:32 |
| → samsoffes joined | 04:33 |
| ← softdrink left | 04:33 |
| → Hydrogen joined | 04:33 |
| ← warthog9 left | 04:34 |
|
Tv
| johnw: umm, why isn't reset --hard what you want? | 04:34 |
|
johnw
| because I have no .git directory in this copy | 04:34 |
| → warthog9 joined | 04:34 |
|
Tv
| johnw: --git-dir= | 04:34 |
| → a-priori joined | 04:34 |
|
johnw
| you're not understanding what I want to do | 04:34 |
|
Tv
| johnw: just make sure you use a different index file | 04:34 |
|
johnw
| i need a directory B to be an updated copy of my index, nothing else | 04:35 |
| → girishr joined | 04:39 |
|
Tv
| johnw: rm -rf a tmp && mkdir a tmp && ( cd a && git init && echo foo >bar && git add bar && git commit -m first; ) && ( cd tmp && GIT_INDEX_FILE=.index git --git-dir=../a/.git reset --hard; ls; ) && ( cd a && git mv bar baz && git commit -m second; ) && ( cd tmp && GIT_INDEX_FILE=.index git --git-dir=../a/.git reset --hard; ls; ) | 04:40 |
| → muthu_ joined | 04:40 |
|
johnw
| doesn't reset --hard reset to HEAD? | 04:41 |
|
Tv
| yes? | 04:41 |
|
johnw
| i need the *index* | 04:41 |
|
| not HEAD | 04:41 |
|
Tv
| then you need plumbing, not porcelain.. | 04:41 |
|
johnw
| yeah | 04:41 |
| ← sporkmonger left | 04:41 |
|
johnw
| this is what I have so far: http://gist.github.com/63050 | 04:42 |
|
Tv
| checkout-index | 04:42 |
|
| not sure if that'll actually remove rules | 04:42 |
|
johnw
| rules? | 04:42 |
|
Tv
| sorry files | 04:43 |
|
| brain fried | 04:43 |
|
johnw
| oh, oops | 04:43 |
|
| it's going to remove them in my working tree! | 04:43 |
| jstad → jstad|away | 04:43 |
|
Tv
| johnw: your clean is misguided, at least | 04:43 |
|
johnw
| i just need to pipe to (cd $TMPDIR; xargs rm) instead | 04:44 |
|
Tv
| johnw: cd $TMPDIR && git --git-dir= might work better | 04:44 |
|
| or --work-tree | 04:44 |
|
| or just use ls-files | xargs | 04:44 |
|
| don't pipe clean output | 04:44 |
|
johnw
| why not? | 04:44 |
|
Tv
| don't use porcelain programmatically, go for plumbing instead | 04:44 |
|
| plumbing is api, porcelain is human-friendly | 04:44 |
|
| ls-files gives you same in guaranteed output format, with \0 termination and all | 04:45 |
|
johnw
| so, how do I list files registered for deletion in the index only? | 04:46 |
|
| ls-files -d isn't it | 04:46 |
| jstad|away → jstad | 04:46 |
|
johnw
| oh, -t | 04:46 |
|
Tv
| there's no such thing as registered for deletion in index ;) | 04:46 |
|
johnw
| deleted in the index | 04:46 |
|
| then | 04:46 |
|
Tv
| i think you want -o | 04:47 |
|
| there's no deleted in index | 04:47 |
|
johnw
| -o shows all non-index files | 04:47 |
|
Tv
| that's just "no entry in index" | 04:47 |
|
johnw
| i did "git rm --cached foo" | 04:47 |
|
| now I want a list that shows just "foo" | 04:47 |
| cpg|dinner|brb → cpg | 04:47 |
|
Tv
| rm --cached removes it from index, afaik | 04:47 |
|
johnw
| yeah | 04:47 |
|
| how do I find out that that happened? | 04:47 |
|
Tv
| so you want a list of files that are in dir but not in index | 04:48 |
|
| aka -o | 04:48 |
|
johnw
| i.e., that between HEAD and index, a file was deleted | 04:48 |
|
| i don't want files in dir but not in index, but rather in HEAD but not in index | 04:48 |
|
Tv
| diff-index | 04:48 |
|
johnw
| ah, great | 04:48 |
|
Tv
| --name-status --diff-filter=.. | 04:48 |
|
johnw
| what does diff-filter do? | 04:49 |
|
| ahh | 04:49 |
|
Tv
| git-diff-index - Compares content and mode of blobs between the index and repository | 04:49 |
|
johnw
| you're a wonder | 04:49 |
|
| git diff-index --cached HEAD --name-status --diff-filter=D | 04:49 |
| ← greyface left | 04:49 |
| → psankar joined | 04:49 |
|
johnw
| if a file is renamed, does it show up only once as "R" | 04:49 |
|
| ? | 04:49 |
|
| i'll try it out | 04:49 |
| ← cemerick left | 04:50 |
|
johnw
| ah, it shows D and A, not R | 04:50 |
|
| git diff-index --cached HEAD --name-only --diff-filter=D -z | xargs -0 rm is actually what I needed, thank you Tv!! | 04:51 |
|
Tv
| johnw: you need to ask to get rename detection | 04:51 |
|
| rm -f -- | 04:52 |
|
| xargs --no-run-if-empty | 04:52 |
|
| ;) | 04:52 |
|
johnw
| ooh, good point | 04:52 |
|
| you are a shell scripting yoda | 04:52 |
|
Tv
| been around that block a few times | 04:52 |
|
johnw
| xargs --no-run-if-empty -0 rm -f -- | 04:52 |
|
| perfect, i'll remember this | 04:52 |
| ← parasti left | 04:53 |
| ← ekidd left | 04:53 |
|
johnw
| http://gist.github.com/63050 | 04:53 |
|
| how's it look now? | 04:54 |
|
| any other gotchas? | 04:54 |
|
| ah, it doesn't exit 1 if myacprep fails | 04:55 |
|
Tv
| set -e | 04:55 |
|
johnw
| what does that do? | 04:56 |
|
Tv
| cd foo && ... | 04:56 |
|
| set -e makes it fail if any command fails | 04:56 |
| → ekidd joined | 04:56 |
|
Tv
| anyway, i'm off to play Left 4 Dead ;) | 04:56 |
|
johnw
| ok, i edited the gist again | 04:57 |
|
| have fun! | 04:57 |
|
| i'd love to find 3 friends to play that with | 04:57 |
|
| ah, xargs doesn't like rm -f -- | 04:57 |
| → amitprakash joined | 05:01 |
|
amitprakash
| err.. can someone please tell me again how to ask git to ignore a file name Manifest in any folder in the repo? | 05:02 |
|
offby1
| I think just put "Manifest" in .gitignore | 05:04 |
|
amitprakash
| offby1, and .gitignore is in .git folder ? | 05:04 |
|
jast
| no, .gitignore belongs somewhere in the working tree | 05:05 |
| → SRabbelier joined | 05:05 |
|
jast
| if you want an untracked list of ignored patterns, use .git/info/exclude | 05:05 |
| ← girishr left | 05:05 |
| → tjafk1 joined | 05:10 |
| ← ekidd left | 05:14 |
| → a-priori_ joined | 05:14 |
| ← amitprakash left | 05:16 |
| → amitprakash joined | 05:17 |
| → sdboyer_ joined | 05:18 |
| → girishr joined | 05:18 |
| ← sverrej left | 05:23 |
| → releod joined | 05:23 |
| → peritus joined | 05:24 |
| ← ashleyw left | 05:24 |
| ← h0nk left | 05:25 |
| ← tjafk2 left | 05:27 |
| ← sdboyer left | 05:27 |
| ← a-priori left | 05:28 |
| → sverrej joined | 05:29 |
| → chalky joined | 05:30 |
| → sdboyer__ joined | 05:31 |
| → error404notfound joined | 05:32 |
| → ashleyw joined | 05:33 |
| ← krawek_ left | 05:36 |
| ← pigeon left | 05:37 |
| → pigeon joined | 05:37 |
| → plediii joined | 05:37 |
| jstad → jstad|away | 05:39 |
| → edwardam joined | 05:39 |
| ← edwardam left | 05:40 |
| ← a-priori_ left | 05:41 |
| jstad|away → jstad | 05:42 |
| ← jstad left | 05:42 |
| ← sdboyer_ left | 05:43 |
|
Circuitsoft
| Is there a way to tell fetch to only get heads with a name beginning with "my_namespace/"? | 05:43 |
|
johnw
| yes | 05:43 |
|
| in your .git/config file | 05:43 |
|
| you'll see it now says refs/heads/* | 05:44 |
|
| just change it | 05:44 |
|
Circuitsoft
| Any way to do it on the command line? | 05:44 |
|
| nevermind. I guess that helps well enough. | 05:45 |
|
johnw
| you can use the "git config" command | 05:45 |
|
| to manipulate the same variable :) | 05:45 |
|
| i just thought editing it would be easier | 05:45 |
|
Circuitsoft
| Next Q: A submodule in a commit points to the sha1 of the tree in it's place when the top tree was committed. | 05:45 |
| ← Hydrogen left | 05:45 |
|
johnw
| if I understand you, yes | 05:46 |
|
Circuitsoft
| Could that submodule point to a different head in my git repo? | 05:46 |
|
johnw
| sure | 05:46 |
|
| i actually do that myself | 05:46 |
|
Circuitsoft
| Like a combination of submodule and git-new-workdir | 05:46 |
|
johnw
| the submodule's URL is just "." | 05:46 |
|
Circuitsoft
| cool. | 05:46 |
| ← giallu left | 05:46 |
| ← hobodave left | 05:46 |
| ← plediii_ left | 05:47 |
| ← peritus left | 05:47 |
|
Circuitsoft
| I'm working on a bug tracking system using git as a backing store. | 05:47 |
|
| (Maybe backing store is the wrong phrase) | 05:47 |
|
johnw
| yeah, i've written one too | 05:48 |
| → karan joined | 05:48 |
|
Circuitsoft
| I planned on using one single git repo as the bug store for all projects in our company. | 05:48 |
| → Tuomas joined | 05:48 |
|
Circuitsoft
| First commit, in that repo, which is tagged, would be a template of an empty bug report. | 05:48 |
|
| then refs/heads/projectname/<sha of original bug report> would point to each bug report. | 05:49 |
| → hobodave joined | 05:49 |
|
Circuitsoft
| Fetch refs/heads/projectname/* as a "bugs" remote on each workdir using it | 05:50 |
|
| And I wanted a location where I could "check out" bugs so that they could have test cases in their subtrees, and those test cases could know exactly where, relative to the source, they are checked out to. | 05:50 |
| ← amitprakash left | 05:51 |
|
mlh
| MarcWeber: re self-reference; e.g. the name of the directory in which the repo sits be mentioned somewhere within .git/config | 05:55 |
|
| I wouldn't expect such a thing; just giving an example of seomthing that might bugger up an rsync/cp -a of a repo | 05:56 |
| → Hydrogen joined | 05:58 |
|
ben_h
| is there a git equivalent to 'svn export'? i googled and found 'git archive', but it doesn't look like that does the same thing. | 06:00 |
| ← curvature left | 06:01 |
| → curvature joined | 06:01 |
|
Circuitsoft
| Is that basically "check out, using my working copy as a reference to speed it up"? | 06:01 |
| ← hobodave left | 06:01 |
| → zeahok joined | 06:02 |
| ← bdimcheff left | 06:03 |
|
zeahok
| With git, how can i modify without commit on more than one branches? | 06:04 |
|
Circuitsoft
| ben_h Exactly what result do you expect from this export-like-thing? | 06:04 |
|
| zeahok - Easiest way is probably with stash. | 06:04 |
|
| However, it's easy enough to amend a commit that you haven't pushed that you may as well commit, then come back later and reset the commit. | 06:04 |
| → hobodave_ joined | 06:05 |
|
zeahok
| oh, i see | 06:05 |
|
| thx | 06:05 |
|
Circuitsoft
| There's also a git-new-workdir script, but it causes havok if both workdirs ever sit on the same branch. | 06:05 |
|
ben_h
| Circuitsoft: a checked out copy of just the given commit - i.e. without /.git and untracked files | 06:06 |
|
Circuitsoft
| Fastest probably would be to do "git archive <tree-ish> | (cd /where/to/put/them; tar xv)" | 06:07 |
| → coffee1 joined | 06:07 |
|
zeahok
| and if i commit before switch to another branch, and later, i switch back and reset the first branch, this temp commit is just as if never exists, right? | 06:07 |
|
ben_h
| Circuitsoft: ahh, git archive outputs a tar? | 06:07 |
|
| nice | 06:07 |
|
Circuitsoft
| zeahok: As long as you don't push. | 06:07 |
|
| ben_h - unless you say --format=zip | 06:07 |
|
| git archive is a very lightweight operation. | 06:08 |
|
| Probably close to, if not as fast as, checkout. | 06:08 |
|
coffee1
| hi all.. new to git here, sort of stuck. doing git pull shows me You are in the middle of a conflicted merge. | 06:09 |
|
Circuitsoft
| coffee1: git mergetool | 06:09 |
|
| Kind of a wizard - simple, but nice. | 06:09 |
|
ben_h
| Circuitsoft: that's good, thanks - i reckon i might wrap that up into a 'git-export' script | 06:10 |
|
Circuitsoft
| ben_h - you can also do | 06:10 |
|
| GIT_DIR=/path/to/git/workdir/.git git checkout <tree-ish> | 06:10 |
| ← johnw left | 06:11 |
|
Circuitsoft
| or, wait... | 06:11 |
|
| That would change your HEAD. | 06:11 |
|
| Nevermind. | 06:11 |
| → reithi joined | 06:11 |
|
coffee1
| Circuitsoft: when im done wiht mergetool, and i chose left and rights.. do i just do "save merged"? | 06:14 |
|
Circuitsoft
| mergetool will add results that you confirm to the index for you. | 06:14 |
|
| Then you just commit and you're done with the merge. | 06:14 |
|
coffee1
| err | 06:14 |
|
| this is the first time im using mergetool, fairly new to commandline git (coming from tortoise svn) | 06:15 |
|
Circuitsoft
| oh. | 06:15 |
|
coffee1
| basically when im done choosing my left and rights... | 06:15 |
|
| how do i close out of it | 06:15 |
|
Circuitsoft
| mergetool brought up some sort of graphical merge tool. It supports several. I likely haven't used the one you're using. | 06:15 |
|
| Is it using tortoisemerge? | 06:15 |
|
coffee1
| ok i'll just click buttons | 06:15 |
|
Circuitsoft
| What program is it? | 06:16 |
|
coffee1
| filemerge | 06:16 |
|
| launched when i ran git mergetool :) | 06:16 |
| ← hagabaka left | 06:17 |
| ← ben_h left | 06:17 |
| ← nick_h[litage] left | 06:17 |
|
Circuitsoft
| Are you on a mac? | 06:17 |
| → peritus joined | 06:18 |
| → hagabaka joined | 06:18 |
|
coffee1
| ya | 06:18 |
|
Circuitsoft
| You probably do want to do "save merged" | 06:18 |
|
| that will return to mergetool, and it will continue with the rest of it's steps. | 06:18 |
| ← karan left | 06:20 |
| → ijcd_ joined | 06:20 |
| → kanru joined | 06:21 |
| ← ijcd_ left | 06:22 |
|
zeahok
| i accidently run <git reset HEAD^> more than once, when i want to cancel temp commit. is there anyway to cancel git reset? | 06:23 |
|
coffee1
| ar | 06:23 |
|
| now i do git pull, and i get this weird msg: error: Entry 'app/controllers/about_controller.rb' would be overwritten by merge. Cannot merge. | 06:23 |
| → peritus__ joined | 06:24 |
|
Circuitsoft
| coffee1: app/controllers/about_controller.rb is an untracked file. | 06:24 |
|
| Either add it, or, my favorite, do a "git stash" to save it for later then pull. | 06:24 |
|
kevlarman
| zeahok: find the most recent commit you want to keep in git reflog | 06:24 |
| ← moconnor left | 06:24 |
|
coffee1
| untracked.. so i have to manually set every new file to be understood by git? | 06:24 |
|
kevlarman
| and reset to it | 06:24 |
|
Circuitsoft
| coffee1 - yes. | 06:25 |
| ← johan-s left | 06:25 |
|
coffee1
| isn't that a bit annoying though? | 06:25 |
|
| what if i accidentally create a new file, and forget to track it | 06:25 |
|
Circuitsoft
| That way, in the case of compiled languages, it's easy to avoid committing object and other temp files. | 06:25 |
|
| In that case, do a commit --amend. | 06:25 |
| ← peritus left | 06:25 |
|
Circuitsoft
| Or, yet another option, use "git fetch" instead and manually merge the remotes in. | 06:25 |
|
| gitk --all is quite handy. | 06:25 |
|
coffee1
| hmm lots of options here lol | 06:26 |
|
| so gitk --all then.. that will track all my new files? | 06:26 |
| ← SLiMIT left | 06:26 |
|
Circuitsoft
| That will show you the entire history tree so you and browse around on it and merge with it more easily. | 06:27 |
|
| I use it kinda like a GPS. | 06:27 |
|
| or map. | 06:27 |
| ← releod left | 06:27 |
| → moconnor joined | 06:27 |
|
zeahok
| so git will track each commit or reset that i did, and i can set the current state to any of them ? | 06:30 |
|
Tv
| zeahok: resets aren't part of permanent history.. | 06:30 |
|
| zeahok: this may or may not help: http://eagain.net/articles/git-for-computer-scientists/ | 06:30 |
|
Circuitsoft
| zeahok - The reflog is really more of an emergency facility that's there when you need it than something to rely upon every day. | 06:31 |
|
zeahok
| thx, but i just tend to make mistakes all the time ^_^ | 06:32 |
|
Circuitsoft
| That's okay. | 06:32 |
|
| It's good for reverting a mistake you just made. | 06:32 |
|
| If you did a reset a few months ago, you can't undo it. | 06:32 |
| ← ZiGzAg_ left | 06:32 |
| → ZiGzAg__ joined | 06:32 |
|
Circuitsoft
| So, as long as you notice your mistakes quickly, you'll be fine. | 06:33 |
| → johnw joined | 06:33 |
|
zeahok
| so i should use reset when i want to forget it, and use revert when i want to remember it? | 06:33 |
|
coffee1
| ugh | 06:34 |
|
| i can't git push... " ! [rejected] master -> master (non-fast forward)" | 06:34 |
|
Circuitsoft
| Did you reset master? | 06:34 |
|
| As long as no one else is pulling from that repo, do a "git push -f" | 06:35 |
|
| (force) | 06:35 |
| ← Beket left | 06:39 |
| → Eulex joined | 06:42 |
| ← Hydrogen left | 06:43 |
| ← sverrej left | 06:43 |
| → sverrej joined | 06:44 |
| ← chalky left | 06:52 |
| ← samsoffes left | 06:53 |
| → Bennid joined | 06:53 |
| → samsoffes joined | 06:54 |
| ← samsoffes left | 06:54 |
| → j416_pod joined | 06:56 |
| ← johnw left | 07:00 |
| → ludde joined | 07:01 |
| ← elmarco left | 07:01 |
| → elmarco joined | 07:01 |
| ← jmspeex left | 07:02 |
| → joshdavey joined | 07:02 |
| → Laibsch joined | 07:05 |
| ← coffee1 left | 07:05 |
| ← plediii left | 07:06 |
| → plediii joined | 07:07 |
| ← icwiener left | 07:09 |
|
Laibsch
| "git mv A dir/;git commit dir/" treats the change as if dir/A was added instead of moved. If I consolidated a couple of files into that directory how can I correctly commit this as a move operation without specifying each and every single file on the command line? | 07:09 |
|
Circuitsoft
| Laibsch - there's no difference. | 07:10 |
|
doener
| "git commit dir/" means "commit only the changes for file matching the path spec dir/" | 07:10 |
|
Laibsch
| Circuitsoft: I am sorry, I don't think you understood my question. | 07:10 |
|
| Let me try again | 07:10 |
|
RandalSchwartz
| most moves are irrelevant to git | 07:10 |
|
doener
| so the removal of A is not committed | 07:10 |
|
RandalSchwartz
| if it's intereting to git, it'll just be noticed | 07:10 |
|
Laibsch
| doener: OK, understood. | 07:10 |
|
RandalSchwartz
| interesting | 07:10 |
|
| the "git mv" command is completely irrelevant | 07:10 |
|
Circuitsoft
| yup | 07:11 |
|
doener
| Laibsch: you can do "git add dir; git commit" or "git commit -i dir" | 07:11 |
|
RandalSchwartz
| it adds nothing to the commit | 07:11 |
|
| commits are just "the new tree" | 07:11 |
|
Circuitsoft
| It will, however, detect the move later if you do a diff and pass the proper filters to gitdiff-core | 07:11 |
|
RandalSchwartz
| they contain no info of renames, deletes, or adds | 07:11 |
|
| i know it's hard to imagine that the extra meta info isn't being used, but in fact, it isn't. it's derived from contents when needed. | 07:12 |
|
doener
| Circuitsoft: well, what Laibsch did would never end up in git detecting a rename, only a copy, and only when using --find-copies-harder | 07:12 |
|
Laibsch
| doener: Thank, -i seems to do what I want | 07:12 |
| ← stephenlb left | 07:12 |
| ← agenteo left | 07:13 |
| ← j416_pod left | 07:13 |
|
Laibsch
| RandalSchwartz: I think you are mistaken (coming from an mtn background, so you are the expert). Think about git log | 07:13 |
|
RandalSchwartz
| git log is derived from commits | 07:13 |
|
Laibsch
| http://wiki.openembedded.net/index.php/Upgrading_Packages | 07:14 |
|
doener
| Laibsch: no, he's right in the fact that no rename meta data is stored | 07:14 |
|
RandalSchwartz
| and commits don't care about renames, or deletes, or adds. | 07:14 |
|
doener
| Laibsch: that's all derived from the content | 07:14 |
|
Laibsch
| OK, I'm still rather new to git | 07:14 |
|
RandalSchwartz
| a commit is a tree plus parents | 07:14 |
|
Circuitsoft
| Laibsch I just read a bunch about the git diff core today, and it was quite insightful on just this question. | 07:14 |
|
RandalSchwartz
| git log derives its data from comparing two commits | 07:14 |
|
Circuitsoft
| I'll see if I can find a link. | 07:14 |
|
RandalSchwartz
| nothing in there talks about rename | 07:14 |
|
doener
| Laibsch: he just missed the fact that your command sequence never committed the removal of A, so there's no way for git to detect a rename there | 07:14 |
| ← bobesponja left | 07:14 |
|
Laibsch
| ic | 07:15 |
|
RandalSchwartz
| "ic"? | 07:15 |
|
Laibsch
| Let me see if I understand this properly | 07:15 |
|
RandalSchwartz
| 'ick'? | 07:15 |
|
Laibsch
| I see | 07:15 |
|
RandalSchwartz
| are you paying for IRC by the character? | 07:15 |
|
Laibsch
| No, I am not a Berliner ;-) | 07:15 |
|
RandalSchwartz
| if so, sucks to be "you" | 07:15 |
|
Laibsch
| ;-) | 07:15 |
|
RandalSchwartz
| or even "u" | 07:15 |
|
Laibsch
| I am lazy | 07:15 |
|
RandalSchwartz
| please don't be | 07:15 |
|
doener
| RandalSchwartz: nah, sux2bu | 07:15 |
|
RandalSchwartz
| some people here aren't english speakers | 07:16 |
|
| when you abbreviate, they may not follow you as well | 07:16 |
|
Laibsch
| I'm not | 07:16 |
|
RandalSchwartz
| so there you go | 07:16 |
|
Laibsch
| alright | 07:16 |
|
RandalSchwartz
| don't be skimpy | 07:16 |
|
Laibsch
| btt ;-) back to topic | 07:16 |
|
Circuitsoft
| I really don't get why txting is popular. | 07:16 |
|
Laibsch
| Let me see if I understand this properly | 07:16 |
|
RandalSchwartz
| Circuitsoft - blame sms | 07:16 |
|
Circuitsoft
| When I send SMS messages (160 char limit) I still use full words and sentences. | 07:16 |
|
RandalSchwartz
| 140 char | 07:16 |
|
| becuase twitter is the same | 07:16 |
|
Circuitsoft
| 160 on CDMA in the us... | 07:17 |
|
RandalSchwartz
| odd | 07:17 |
|
doener
| 160 over here (Germany), too | 07:17 |
|
RandalSchwartz
| sms is 140 in the us | 07:17 |
|
Circuitsoft
| AFAIK, SMS is always 160 chars | 07:17 |
|
Laibsch
| "cp a.txt b.txt ; git rm a.txt ; git add b.txt;git commit a.txt b.txt;git log b.txt" will show me the complete history of a.txt as well? | 07:17 |
|
Circuitsoft
| Twitter is 160 chars | 07:17 |
|
| yes | 07:18 |
| → spooneybarger joined | 07:18 |
|
Laibsch
| Because if that is not the case a rename is not the same | 07:18 |
|
doener
| Laibsch: no, but "git log --follow b.txt" will | 07:18 |
|
Tv
| Circuitsoft: umm, twitter is 140 chars | 07:18 |
|
RandalSchwartz
| weird - why is twitter 140 chars then? | 07:18 |
|
doener
| Laibsch: but the same is true for "git mv a.txt b.txt" | 07:18 |
|
Tv
| they reserve some to say from who the tweet was, when they send SMS to your phone | 07:18 |
|
| anyway, who uses sms anymore | 07:18 |
|
| stop giving greedy telcos money | 07:18 |
|
Laibsch
| doener: OK, but then the "git mv;git commit -i" thing will automatically do the right thing and thus be "better" | 07:18 |
|
Circuitsoft
| Laibsch: git blame will also follow history back. | 07:18 |
|
Arjen
| SMS is 1120 bits, which is 160 or 140 characters, depending on 7 or 8 bit characters | 07:19 |
|
RandalSchwartz
| ahh | 07:19 |
|
Circuitsoft
| Okay. | 07:19 |
|
| So SMS is 140 chars in languages that aren't 7-bit clean. | 07:19 |
|
doener
| Laibsch: hm? it's more convenient to use "git mv a b" than to use "mv a b; git add -u a; git add b", yes. But otherwise, there's no difference | 07:19 |
|
RandalSchwartz
| in fact... cp a /tmp/xx; git rm a; cp /tmp/xx b; git add b | 07:20 |
|
| that'd do the same as "git mv a b" | 07:20 |
| → chalky joined | 07:20 |
| ← comebo left | 07:21 |
| → thiago_home joined | 07:21 |
|
RandalSchwartz
| the actual "mv" isn't recorded in the mv | 07:21 |
|
| er... commit | 07:21 |
| → giallu joined | 07:21 |
|
Tv
| Circuitsoft: that's not really true either because then there's the bastard version that repurposes {|}[\] for non-ascii characters ;) | 07:22 |
| ← rphillips left | 07:22 |
| → topinupa joined | 07:22 |
|
Circuitsoft
| Tv: I'm not aware of that. | 07:23 |
|
Tv
| Circuitsoft: that was used heavily in the days of non 8-bit safe transports on usenet etc | 07:23 |
|
| recently i've seen some spam with that encoding, which means somebody fed old usenet archives to a markov chain ;) | 07:24 |
| → rphillips joined | 07:24 |
| ← ashleyw left | 07:25 |
|
Tv
| http://en.wikipedia.org/wiki/7-bit_ASCII#Incompatibility_vs_interoperability | 07:25 |
| → mikeando joined | 07:25 |
| ← robinr left | 07:26 |
| → gaveen joined | 07:26 |
| → samsoffes joined | 07:27 |
| → Weaselweb joined | 07:29 |
| → ph^ joined | 07:29 |
| ← samsoffes left | 07:32 |
| → tansell joined | 07:34 |
| → kate21de joined | 07:35 |
| → \ask- joined | 07:40 |
| → CardinalNumber joined | 07:41 |
|
dj_ryan
| hmm | 07:44 |
|
| a question | 07:44 |
|
| im trying git rebase | 07:44 |
|
| dealing with the conflicts... once i hit 'git add file/been/resolved' | 07:45 |
|
| it dissapears | 07:45 |
| → reprore joined | 07:45 |
|
dj_ryan
| and git rebase --continue dosnt work | 07:45 |
|
JohnFlux
| should I add the m4/ directory to git? | 07:45 |
|
| in a c++ progarm | 07:45 |
| → scheng joined | 07:47 |
| → hdl2 joined | 07:48 |
|
fynn
| when I "git diff", it doesn't show the contents of added files. | 07:48 |
|
| how can I get that? | 07:48 |
|
Circuitsoft
| fynn - do you want to diff the index against the working dir or against HEAD? | 07:49 |
|
ZiGzAg__
| anyone who uses githooks? | 07:49 |
| ← reprore left | 07:49 |
|
doener
| fynn: if you "git add" a file, it's added to the index, so the diff of the working tree against the index (that's what "git diff" does) is empty | 07:49 |
|
| fynn: "git diff --cached" would show it, as that diffs the index against HEAD | 07:50 |
|
| fynn: with recent git versions, you can do "git add -N file", that just records that you intent to add the file, so "git diff" will show it | 07:50 |
| ← mikeando left | 07:51 |
|
fynn
| doener: OK, how do I see both --cached and vanilla? | 07:51 |
|
doener
| "git diff HEAD" ==> working tree against HEAD | 07:51 |
|
fynn
| doener: thanks :) | 07:52 |
| → bentob0x joined | 07:52 |
|
doener
| dj_ryan: and "git rebase --continue" says what? | 07:52 |
| ← thiago_home left | 07:54 |
| ← ProperNoun left | 07:55 |
|
ZiGzAg__
| i cant find much documentation of the githooks, and creating a simple script like "touch /tmp/test" as commit-msg and chmod'ing to 755 doesnt do anything.. do i have to commit and push the files in the .git folder too? | 07:55 |
| → theCarpenter1 joined | 07:55 |
| → johnw joined | 07:56 |
|
doener
| ZiGzAg__: you can't even add those files. | 07:57 |
|
| ZiGzAg__: how did you test that hook? | 07:57 |
|
ZiGzAg__
| i manually moved the file in the main repos | 07:59 |
| ← moconnor left | 07:59 |
|
doener
| "main repos"? | 07:59 |
|
ZiGzAg__
| on the server | 08:00 |
|
doener
| hooks work locally... the commit-msg hook is triggered by "git commit", so of course you need that hook in a repo where you actually run "git commit" | 08:00 |
| ← UnwashedMeme left | 08:00 |
|
ZiGzAg__
| ah, damn ofc.. im still transitioning from cvs | 08:01 |
| → ceyusa joined | 08:05 |
| → melvinram joined | 08:05 |
| → morph__ joined | 08:06 |
| ← morph_ left | 08:06 |
| morph__ → morph | 08:06 |
| ← ZiGzAg__ left | 08:06 |
| morph → morph_ | 08:06 |
| ← theCarpenter1 left | 08:07 |
| → zobie joined | 08:07 |
| → UnwashedMeme joined | 08:08 |
| ← zobie left | 08:09 |
| ← girishr left | 08:09 |
| ← tansell left | 08:10 |
| ← ph^ left | 08:10 |
|
telmich
| moin moin | 08:12 |
|
| what's the easiest way to find out, whether a commit was introduced before or after a specific commit or tag? | 08:13 |
| → UnwashedMeme1 joined | 08:13 |
|
johnw
| for the tag case, use git describe | 08:14 |
|
| as in "git describe $commit" | 08:14 |
|
| that will tell you which tag it's a part of | 08:14 |
|
| for the general case, I would just say git log --pretty=oneline | grep $commit | 08:14 |
|
| to see if it's in the list | 08:14 |
| → ph^ joined | 08:15 |
|
telmich
| hmm | 08:15 |
| ← fynn left | 08:15 |
|
johnw
| ah, you wanted before or after | 08:17 |
|
| one thing you can do is: git show-branch $commit1 $commit2 | 08:17 |
|
| then you'll see the relative history between the two | 08:17 |
|
telmich
| johnw: git describe $commit is pretty near to what I searched | 08:17 |
| → ph^_ joined | 08:19 |
| → mcella joined | 08:19 |
|
telmich
| johnw: git show-branch 89c581b3fb2986e303f1299e6458e3e9b115fa3f 2.6.29-rc4-1-gd5b5623 and git show-branch 2.6.29-rc4-1-gd5b5623 89c581b3fb2986e303f1299e6458e3e9b115fa3f both show many commits | 08:21 |
|
| johnw: but this does not make clear for me, whether 89c581b3fb2986e303f1299e6458e3e9b115fa3f is already part of 2.6.29-rc4-1-gd5b5623 or not | 08:22 |
|
johnw
| they show the relative histories | 08:22 |
|
| ah | 08:22 |
|
telmich
| johnw: the problem I'm solving is: i got a patch, that should fix my wlan problem; but I think the kernel I built already contains the patch (with a seperate commit) | 08:23 |
|
| now I'm searching for the easiest way to tell the developer that I'm already running a kernel using that patch | 08:23 |
| → ProperNoun joined | 08:24 |
| → Niamor7 joined | 08:24 |
|
johnw
| do you know the commit id of the patch? | 08:24 |
|
telmich
| yep, it's 89c581b3fb2986e303f1299e6458e3e9b115fa3f | 08:24 |
|
johnw
| and you want to know if your current branch includes this commit? | 08:24 |
|
telmich
| and 2.6.29-rc4-1-gd5b5623 is the "kernel version" I'm running | 08:25 |
| → [1]metaperl_work joined | 08:25 |
|
telmich
| johnw: no, I want to know whether 2.6.29-rc4-1-gd5b5623 includes this commit | 08:25 |
|
johnw
| ah, ok | 08:25 |
|
| now I get you | 08:25 |
|
telmich
| because currently I'm building latest linux-2.6, so HEAD is different | 08:25 |
|
drizzd_
| git rev-list d5b5623..89c581b3f | 08:26 |
| → dmlloyd_ joined | 08:26 |
|
drizzd_
| 89c581b3f is included if the output of this command is empty | 08:26 |
|
johnw
| yes, drizzd_ is right | 08:27 |
|
| was just getting the args right on the same command | 08:27 |
| ← UnwashedMeme left | 08:27 |
| ← ceyusa left | 08:27 |
| ← CardinalNumber left | 08:27 |
| ← gaveen left | 08:27 |
| ← pigeon left | 08:27 |
| ← Daniel_B left | 08:27 |
| ← Niamor left | 08:27 |
| ← Ratler left | 08:27 |
| ← MarcWeber left | 08:27 |
| ← schlort left | 08:27 |
| ← metaperl_work left | 08:27 |
| ← precision left | 08:27 |
| ← PugMajere left | 08:27 |
| ← johs left | 08:27 |
| ← Bracki left | 08:27 |
| ← jacobat left | 08:27 |
| ← milli left | 08:27 |
| ← Helios left | 08:27 |
| ← andres left | 08:27 |
| ← com4 left | 08:27 |
| ← mpr left | 08:27 |
| ← radii left | 08:27 |
| ← kadoban left | 08:27 |
| ← multani left | 08:27 |
| ← mike_m left | 08:27 |
| ← Pieter left | 08:27 |
| ← lamont left | 08:27 |
| ← KiBi left | 08:27 |
| ← ruphy left | 08:27 |
| ← cnu left | 08:27 |
| ← dotwaffle left | 08:27 |
| ← eMBee left | 08:27 |
| ← jpeeler left | 08:27 |
| [1]metaperl_work → metaperl_work | 08:27 |
|
telmich
| ok, in that case it's not (got some commit ids) | 08:27 |
| ← jchris left | 08:27 |
| → ceyusa joined | 08:28 |
| → CardinalNumber joined | 08:28 |
| → gaveen joined | 08:28 |
| → pigeon joined | 08:28 |
| → Daniel_B joined | 08:28 |
| → Bracki joined | 08:28 |
| → Ratler joined | 08:28 |
| → MarcWeber joined | 08:28 |
| → schlort joined | 08:28 |
| → ruphy joined | 08:28 |
| → lamont joined | 08:28 |
| → mpr joined | 08:28 |
| → Helios joined | 08:28 |
| → jpeeler joined | 08:28 |
| → multani joined | 08:28 |
| → kadoban joined | 08:28 |
| → mike_m joined | 08:28 |
| → jacobat joined | 08:28 |
| → eMBee joined | 08:28 |
| → cnu joined | 08:28 |
| → precision joined | 08:28 |
| → johs joined | 08:28 |
| → milli joined | 08:28 |
| → radii joined | 08:28 |
| → com4 joined | 08:28 |
| → andres joined | 08:28 |
| → KiBi joined | 08:28 |
| → PugMajere joined | 08:28 |
| → dotwaffle joined | 08:28 |
| → Pieter joined | 08:28 |
| ← pigeon left | 08:28 |
| → pigeon joined | 08:28 |
| ← jpeeler left | 08:29 |
| ← gaveen left | 08:30 |
| → gaveen joined | 08:31 |
| → galderz joined | 08:31 |
| → charon joined | 08:31 |
|
telmich
| hmm | 08:32 |
|
| drizzd_: are you sure? | 08:32 |
|
| I just did this test: took one commit _after_ 89c581b3fb2986e303f1299e6458e3e9b115fa3f, which is 17c9d12e126cb0de8d535dc1908c4819d712bc68 | 08:33 |
|
| and then did git rev-list 17c9d12e126cb0de8d535dc1908c4819d712bc68..89c581b3fb2986e303f1299e6458e3e9b115fa3f | 08:33 |
|
| which is not empty | 08:33 |
|
| by the way: I'm using linux-2.6, if you want to test it yourself | 08:34 |
|
drizzd_
| telmich: git rev-list 89c581b3f..17c9d12e12 | 08:34 |
|
| |wc -l gives 424 | 08:34 |
| → girishr joined | 08:35 |
|
telmich
| yep, and the other way round it's wc -l = 11 | 08:35 |
|
Laibsch
| http://wiki.openembedded.net/index.php/GitPhraseBook#Setup documents one way for users to access git and another one for those with write access. I have already checked out as a normal user. Can I switch to the other access method or do I need to make a completely new checkout? | 08:36 |
|
| checkout = git clone | 08:36 |
|
drizzd_
| either way, the commit is clearly not "one commit after", or even "424 commits after" | 08:36 |
|
| because 89c581b is not the only ancestor | 08:36 |
|
| (otherwise one of the rev-lists would be empty) | 08:36 |
|
telmich
| drizzd_: I determined "after" by doing git log, /89c581b3fb2986e303f1299e6458e3e9b115fa3f, scrolled up to the next commit and selected its commit id | 08:37 |
| ← doener left | 08:38 |
| → doener joined | 08:38 |
| → msanchez joined | 08:38 |
| ← gaveen left | 08:38 |
| thumper_laptop → thumper | 08:39 |
| ← dmlloyd left | 08:40 |
|
drizzd_
| telmich: git log has to display a DAG in a linear manner. it's not surprising that the commits don't actually have that linear order. | 08:41 |
|
JohnFlux
| how do I revert the changes on a single file? | 08:41 |
|
drizzd_
| telmich: see "Commit Ordering" in git-log(1) | 08:41 |
| ← CardinalNumber left | 08:42 |
|
telmich
| drizzd_: will do, thanks | 08:42 |
|
drizzd_
| JohnFlux: git checkout <revision> <file> | 08:42 |
|
JohnFlux
| drizzd_: thanks | 08:43 |
|
telmich
| drizzd_: I'm now using gitk for a better view | 08:46 |
| → j416 joined | 08:47 |
|
telmich
| dammit... I just got the commit, because the last commit is a merge of the branch containing it | 08:49 |
| ← ph^ left | 08:50 |
| → jmesnil joined | 08:51 |
| → tvw joined | 08:51 |
| ← benjo2 left | 08:54 |
| → temoto-wd joined | 08:56 |
| ← dreiss left | 08:57 |
|
drizzd_
| telmich: I don't know if there is a smarter way to do this, but to get the children of a commit you can do `git rev-list --children 89c581b3fb2986e303f1299e6458e3e9b115fa3f~..origin/master|grep ^89c581|cut -f2- -d' '` | 08:57 |
| ← lordpil left | 08:58 |
| → lordpil joined | 08:58 |
| → exon joined | 08:58 |
|
exon
| Anyone seen dscho around lately? | 08:59 |
| → jpeeler joined | 08:59 |
| → theCarpenter1 joined | 08:59 |
|
doener
| left about 9 hours ago | 08:59 |
|
exon
| I'll try email then. Thanks | 09:00 |
| ← killerchicken left | 09:03 |
|
deavid
| there is a standard way to add more apps to "git mergetool"; for example i want to add my own Qt3Designer for the .UI files. | 09:05 |
|
| ? | 09:05 |
| ← giallu left | 09:05 |
| ← ia left | 09:07 |
|
doener
| deavid: look for "mergetool" in git-config(1) | 09:07 |
|
un|ogic
| or see http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html | 09:08 |
| → ia joined | 09:08 |
|
deavid
| <<Any other value is treated is custom merge tool and there must be a corresponding mergetool.<tool>.cmd option.>> good. Thanks! | 09:09 |
| ← elmex left | 09:10 |
| → elmex joined | 09:10 |
| ← tango_ left | 09:14 |
| → reprore joined | 09:15 |
| → giallu joined | 09:15 |
| → sitaram joined | 09:15 |
| ← sitaram left | 09:18 |
| → sitaram joined | 09:19 |
| → UnwashedMeme joined | 09:19 |
| ← bronson left | 09:20 |
| ← anjovis left | 09:21 |
| → offby1` joined | 09:26 |
| Naib_ → Naib | 09:27 |
| → jony_ joined | 09:27 |
| ← jony left | 09:28 |
| → priidu joined | 09:29 |
| ← ph^_ left | 09:29 |
| ← orlando||lando left | 09:29 |
| → ph^ joined | 09:29 |
| ← reprore left | 09:30 |
| → reprore joined | 09:30 |
| → rraasch joined | 09:31 |
| ← rraasch left | 09:32 |
|
Circuitsoft
| Is there any file I can write to that will be prepended to the blank commit message when an editor is brought up for commit? | 09:32 |
| → solydzajs joined | 09:32 |
| → rraasch joined | 09:33 |
| ← UnwashedMeme1 left | 09:33 |
|
doener
| Circuitsoft: commit.template | 09:34 |
|
| Circuitsoft: set that to the template file | 09:34 |
| ← meyering left | 09:35 |
| → LotR joined | 09:35 |
|
dato
| uhm | 09:37 |
|
| I wish log --abbrev-commit would not append trailing dots to the abbreviated hash | 09:37 |
|
Circuitsoft
| How will git gui handle commit.template and the file it points to changing relatively often? | 09:38 |
| → gaveen joined | 09:39 |
| ← kate21de left | 09:40 |
| ← offby1 left | 09:40 |
| ← iulian left | 09:41 |
| → moccuo joined | 09:42 |
| → naeu joined | 09:43 |
|
sitaram
| dato: try playing around with --format maybe? | 09:44 |
|
moccuo
| hi, so im trying to setup a remote git repo. i initialized a bare repo on the server, and then added a remote on my local repository adn then tries pushing to it and i get the whole "! [remote rejected] master -> master (n/a (unpacker error))" and "error: failed to push some refs" error.. any ideas? | 09:44 |
|
sitaram
| for my 1-line output, I've replaced the traditional 'log --abbrev-commit --pretty=oneline' with something using format that works very well | 09:44 |
|
dato
| sitaram: yeah, except that I'd like it for the default log output, and that's a bit more cumbersome | 09:45 |
|
| and --abbrev=7 doesn't seem to work here | 09:45 |
|
JohnFlux
| how can I commit-and-merge-with-last-commit? :) | 09:45 |
|
| I committed, but now realised that I made a mistake | 09:45 |
|
doener
| JohnFlux: --amend | 09:46 |
|
kadoban
| JohnFlux: commit --amend | 09:46 |
|
JohnFlux
| ah | 09:46 |
|
dato
| ah | 09:46 |
| ← tvw left | 09:46 |
|
sitaram
| dato: true :-( | 09:46 |
|
JohnFlux
| awesome :) | 09:46 |
| ← theCarpenter1 left | 09:47 |
| → meyering joined | 09:47 |
|
dato
| ah, --abbrev is only for diff --raw | 09:47 |
| ← meyering left | 09:47 |
|
charon
| dato: --abbrev-commit | 09:47 |
| → meyering joined | 09:47 |
|
charon
| oh, sorry, i should've read the backlog. | 09:47 |
|
| charon hides again | 09:47 |
| → tango_ joined | 09:50 |
| ← drizzd_ left | 09:51 |
| → dwave joined | 09:54 |
| → lxsameer joined | 09:55 |
| → radarek joined | 09:56 |
|
sitaram
| dato: are you parsing it? meaning if you don't need the colors you *could* use a sed or something in between...? | 09:56 |
|
lxsameer
| if i clone from a big repository and in the middle of cloning i disconnct from internaet , the what's happend ? can i resume that later? | 09:57 |
|
dato
| sitaram: no, this is just for my consumption; I find the short version much more pleasing (particularly to copy&paste), even if it costs some computational power to calculate it | 09:58 |
|
sitaram
| dato: before I decided I like the one line summary a lot more for most day-to-day stuff, I used to use this: log --abbrev-commit --pretty=oneline | 10:01 |
|
charon
| dato: http://gist.github.com/63828 | 10:01 |
|
| i wonder if this could be turned into a patch without breaking too many things | 10:01 |
| → mithro joined | 10:02 |
| → yofel joined | 10:02 |
| ← j416 left | 10:03 |
| → JensB joined | 10:04 |
|
JensB
| Hi everybody | 10:04 |
|
JohnFlux
| Hi Dr. Jens! | 10:05 |
| ← \ask- left | 10:05 |
|
JensB
| ah. so that's where my thesis has been | 10:06 |
|
| :) | 10:06 |
|
dato
| ah, at least now I understand why it adds dots | 10:06 |
|
JensB
| anyway .. I have a small problem with Git: heres what I did | 10:06 |
| → drizzd joined | 10:07 |
|
JensB
| situation: local Git repo connected to remove SVN repo, every now and then I do "git svn dcommit". Yesterday I dcommitted that way, today I discovered I wanted to --amend some files to the commit. Today, "git svn dcommit" tells me "Item already exists in filesystem: File already exists: filesystem '/srv/db', transaction '198-1', path '/dor/trunk/app/controllers/meeting_points_controller.rb' at /usr/local/git/libexec/git-core/git-svn line 469". | 10:08 |
|
| How do I fix this? | 10:08 |
|
| any way I can remove the --amended files from the commit and split the commit in two so it matches the SVN state again? | 10:09 |
|
charon
| JensB: find the old state in 'git log -g', then say 'git reset --soft $old_state' to undo the amending and 'git commit' to make a new commit for the second half | 10:09 |
|
| and don't _ever_ rewrite (amend, rebase, filter-branch) commits that come from git-svn | 10:10 |
|
JensB
| ok, I'll tattoo that on my forehead | 10:10 |
|
| thanks | 10:10 |
| → Phlogi joined | 10:13 |
| → _slacker_ joined | 10:14 |
| ← johnw left | 10:17 |
| ← Phlogi left | 10:19 |
| ← warthog9 left | 10:19 |
| → warthog9 joined | 10:20 |
| ← sverrej left | 10:25 |
| ← girishr left | 10:25 |
| → girishr joined | 10:27 |
| → cemerick joined | 10:30 |
| → markelikalderon joined | 10:32 |
| ← avtolfm left | 10:32 |
| melvinram → melvinram|away | 10:33 |
| ← drizzd left | 10:33 |
| ← gaveen left | 10:34 |
| → Zaphodbee joined | 10:34 |
| → bram joined | 10:35 |
| ← ndim left | 10:36 |
| ← Zaphodbee left | 10:36 |
|
bram
| hey guys, I have a simple question: I have some unstanged changes in master, and I decided it's best to switch to a branch and work on these changes instead of doing them in master. so, how can I make a branch, and have the uncomitted/unstaged changes in my master "moved" to that branch ? | 10:36 |
|
doener
| uncommitted changes are not on any branch | 10:37 |
|
Circuitsoft
| bram "git branch new_branch_name" | 10:37 |
|
doener
| just "git checkout -b bla" | 10:37 |
|
snuxoll
| doener's is correct | 10:37 |
|
Circuitsoft
| Don't those actually do the same thing? | 10:37 |
|
snuxoll
| Circuitsoft: no, git branch won't create a new branch | 10:37 |
|
doener
| snuxoll: hm? | 10:37 |
|
Circuitsoft
| I've done it. | 10:37 |
| ← lxsameer left | 10:37 |
|
doener
| "git branch" won't checkout | 10:37 |
|
bram
| well, tried that, but as doener says, the uncomitted changes aren't on a branch, so they aren't there in the branch | 10:37 |
| → ndim joined | 10:38 |
|
snuxoll
| doener: ah, yes | 10:38 |
|
Circuitsoft
| nothing is on a branch until you commit it | 10:38 |
|
| "git branch new_branch" will make a new branch off the current head. | 10:38 |
|
bram
| so, my only option would be to create a patch from the diff, undo the changes in master, branch, apply the patch in the branch? | 10:38 |
|
snuxoll
| bram: when you checkout a new branch you'll fork a new branch based on head, any uncommited changes are corried between branches | 10:38 |
|
| *carried | 10:38 |
|
doener
| bram: no, just checkout the other branch and commit | 10:39 |
|
bram
| snuxoll: umm, no, they aren't | 10:39 |
|
| I just tried that | 10:39 |
|
alus
| bram: last name C.? | 10:39 |
|
snuxoll
| bram: if I modify a file and switch branches without commiting, the file won't be checked out from the switched branch | 10:39 |
|
bram
| alus: hehe, no, last name "de Jong" | 10:39 |
|
charon
| dato: i think this is cleaner: http://gist.github.com/63843 | 10:39 |
|
alus
| bram: ok | 10:39 |
|
charon
| dato: running tests now, i'll send it out after lunch. | 10:39 |
|
doener
| bram: yes, uncommitted changes _are_ kept when you switch branches | 10:40 |
|
bram
| snuxoll: if I git checkout newbranch, the (non-comitted, nonstaged) changes are undone and a checkout is made from head | 10:40 |
|
| snuxnull: git checkout geotag-refactor <- results in two modifications | 10:40 |
|
| that reset my files to what they were before the changes | 10:41 |
|
snuxoll
| bram: no, it's stating that those files are modified | 10:41 |
|
doener
| bram: http://git.pastebin.com/m68453cb0 | 10:41 |
| → merlin83 joined | 10:41 |
|
bram
| er, oh, errrrrrrrrrrr | 10:41 |
|
| damn | 10:41 |
|
dato
| charon: cool | 10:41 |
|
snuxoll
| bram: unstaged files are not modified when you switch branches, that's what it's telling you | 10:41 |
|
dato
| charon: I didn't realize you were Thomas Rast | 10:41 |
|
bram
| I'm a stubornheaded pig, I am! | 10:42 |
|
| :_ | 10:42 |
|
| :) | 10:42 |
|
| sorry guys, you are completely right | 10:42 |
|
dato
| charon: thanks a lot for ca6ac7f ("add -p: prompt for single characters") | 10:42 |
|
Gitbot
| [git ca6ac7f]: http://tinyurl.com/aur9xw -- add -p: prompt for single characters | 10:42 |
|
dato
| ah, ok | 10:42 |
| ← snuxoll left | 10:44 |
| → snuxoll joined | 10:44 |
| ← cemerick left | 10:47 |
| ← exon left | 10:48 |
| ← eean left | 10:49 |
| → drizzd joined | 10:49 |
| → eean joined | 10:49 |
| ← yofel left | 10:50 |
| → yofel joined | 10:51 |
| ← _Vi left | 10:52 |
| → _Vi joined | 10:54 |
| ← peritus__ left | 10:55 |
| → j416 joined | 11:02 |
| ← markelikalderon left | 11:03 |
| ← j416 left | 11:06 |
| ← warthog9 left | 11:06 |
|
Circuitsoft
| On git-fetch, I can limit what refs it pulls down with the remote.remotename.fetch config variable. | 11:06 |
|
| Can I limit tags? | 11:06 |
| → warthog9 joined | 11:07 |
|
Circuitsoft
| Or will it only fetch tags associated with the pulled refs? | 11:07 |
| ← scheng left | 11:10 |
|
drizzd
| --tags will download all tags | 11:10 |
| ← Fissure left | 11:11 |
| ← dirker left | 11:11 |
| → dirker joined | 11:11 |
| → Fissure joined | 11:11 |
|
drizzd
| tags "associated" with fetched refs are also fetched automatically (even without --tags) | 11:11 |
|
Circuitsoft
| ok | 11:11 |
|
| cool. Thanks. | 11:11 |
| ← kimrhh left | 11:12 |
| ← rsd left | 11:13 |
| → \ask joined | 11:15 |
| → peritus joined | 11:18 |
| ← Bennid left | 11:20 |
| → markelikalderon joined | 11:23 |
| ← jony_ left | 11:25 |
| → ntoll joined | 11:26 |
| ← zeahok left | 11:27 |
| → lorandi joined | 11:30 |
| → cemerick joined | 11:32 |
| → gzy joined | 11:34 |
|
gzy
| hi, after merging back to trunk, and deleting the branch i noticed that i have it merged wrongly (i'm missing some functionality that was in the branch) | 11:35 |
|
| is there a way to get the branch back, or to be exact it's changes? | 11:35 |
| ← peritus left | 11:35 |
| → johan-s joined | 11:37 |
|
Eridius
| gzy: yes there is, but I'm not in a mood to hold your hand through it. I'm only responding to let you know that your problem has a very simple solution, and hopefully someone else will step up and teach you | 11:38 |
| ← muthu_ left | 11:39 |
| porcnick_ → porcnick | 11:43 |
| → exon joined | 11:44 |
| → mfilipe joined | 11:51 |
| → chrisdone joined | 11:51 |
| ← porcnick left | 11:52 |
|
sitaram
| gzy: if I understand you correctly, (and if I had to do this very simply), use gitk to point to the merge commit, look at the 2 parent SHA1, figure out which one was your old branch, and then 'git branch my_branch abcdef' (or whatever the sha1 was) | 11:52 |
| → Hendu joined | 11:52 |
|
sitaram
| other methods include doing stuff like trunk^2 (or trunk^; not sure which without experimenting) | 11:53 |
|
drizzd
| gzy: did you delete with -d or -D? | 11:53 |
| → eletuchy_ joined | 11:53 |
|
gzy
| hey, thanks, i deleted with -d, and i found the change removing my missing code in the log... | 11:54 |
|
| becouse the individual logs from the branch dev show up in my log after merge right? | 11:54 |
|
| anyways i fetched the changset for that commit and done the whole thing somewhat manually.. the important thing is the data was there. | 11:54 |
|
drizzd
| the "logs" being the commits, yes | 11:55 |
|
gzy
| is there a log parameter to output the branch they came from to? meaning is the commit - branch relation kept in history? | 11:55 |
|
drizzd
| no | 11:56 |
|
| but it's in the merge message | 11:56 |
|
gzy
| ok, thanks | 11:59 |
| ← gzy left | 11:59 |
| ← yann left | 12:03 |
| ← eletuchy left | 12:03 |
| → jmspeex joined | 12:06 |
| ← mcella left | 12:07 |
| ← moccuo left | 12:07 |
| → moore33 joined | 12:10 |
| ← sitaram left | 12:11 |
|
moore33
| How do I list the direct children of a commit? | 12:11 |
| ← Laibsch left | 12:12 |
| ← wanders left | 12:12 |
|
heipei
| children? | 12:12 |
|
| you mean parents | 12:12 |
|
moore33
| No... | 12:12 |
|
| Those commits that have a given commit as a parent. | 12:12 |
|
heipei
| you mean "the commits that this commit is based on" | 12:12 |
|
Circuitsoft
| No. | 12:12 |
|
moore33
| No! "the commits that are based on this commit." | 12:12 |
|
Circuitsoft
| He means the commits that are based on this commit. | 12:12 |
|
| heivei: Assume "this commit" is not a head. | 12:13 |
|
charon
| dato: heh. you're welcome... and tbh the '...' bothered me too, otherwise i wouldn't have jumped at the opportunity to write a patch | 12:13 |
| → wanders joined | 12:13 |
|
moore33
| gitk lists this directly for a commit, so I assume it's not too hard to dig out of git-log or something. | 12:13 |
|
jnl
| moore33: git rev-list --children? | 12:13 |
|
moore33
| jnl: I thought so, but I can't seem to make it do what I want. | 12:15 |
|
heipei
| well, looking for children isn't really how git works, so i'd assume its very inefficient | 12:16 |
|
| because it basically needs to check _every_ object and compare if the parent-entry matches | 12:16 |
|
jnl
| moore33: in what way? | 12:16 |
| ← psankar left | 12:17 |
|
moore33
| heipei: Does that imply that git-branch --contains is very inefficient? | 12:17 |
|
heipei
| no, it just checks the commits reachable by the branch | 12:18 |
| → ekidd joined | 12:18 |
|
moore33
| jnl: In my (limited) screwing around with --children, it's not clear what it's doing. | 12:18 |
|
heipei
| moore33: im talking about all the objects in a repository | 12:18 |
|
| moore33: well, that is an idea: you could do a "git branch --contains <parent>" for every branch, and get the branches containing children | 12:19 |
| → Sho_ joined | 12:19 |
|
jnl
| moore33: hm yes, not doing what i thought it would do ... | 12:19 |
|
moore33
| heipei: OK. If I assume that the children I'm interested in exist on some branch, then it seems like a feasible problem. | 12:19 |
|
heipei
| moore33: yeah, if not, sure, you'd have to search the whole object database | 12:20 |
|
moore33
| heipei: I guess I need to look at gitk and see how it gets that info. But gitk does look at the whole database :) hmm. | 12:20 |
| ← Flathead left | 12:20 |
|
heipei
| moore33: yeah, probably it looks at all the refs | 12:21 |
|
azuk
| it might be illuminating to add --all to git rev-list --children? | 12:22 |
|
jnl
| ah, yes. so without the --all it wont traverse the children, so they wont show up...? | 12:24 |
|
| so... --all | grep $sha :) | 12:24 |
| → peritus joined | 12:26 |
| ← awx left | 12:26 |
| → sporkmonger joined | 12:26 |
| → Laibsch joined | 12:27 |
|
heipei
| ah, now i understood how to read the output of rev-list with --children | 12:27 |
|
| moore33: git rev-list --children --max-count=2 <commit> | 12:29 |
|
| try that | 12:29 |
|
azuk
| jnl, um no, there are no children that it could traverse, think that the history is represented using a single linked list where you can get to the parent but not the other way, and see the description of --all parameter | 12:29 |
| → boto joined | 12:29 |
| ← countd left | 12:31 |
|
jnl
| azuk: why wouldnt it traverse the children with the --all? git rev-list --children --all |grep $sha seems to work (based on sample size of 1 :) ) | 12:32 |
| → countd joined | 12:32 |
|
moore33
| heipei: I see how it might work, but it's not actually finding the children of the commit I'm interested in... | 12:33 |
|
heipei
| moore33: it is for me. the commit is listed left, and right of it a child | 12:33 |
| → luis joined | 12:33 |
|
azuk
| jnl, actually, I misinterpreted what you said, forget it | 12:33 |
|
heipei
| i've only tried it with linear history | 12:33 |
|
luis
| Hello. What would be the most straight forward way to do checkout onto some temporary dir? | 12:34 |
|
moore33
| I think the command that is closest to what I want is git rev-list --parents --all | grep $sha1 | 12:34 |
|
jnl
| yeah, the max-count might not work for all cases | 12:35 |
|
azuk
| moore33, as a fellow Common Lisper, you might find it helpful to think of git's history as a DAG represented using conses (even the need to have gc should be obvious then) | 12:35 |
|
luis
| I want to do two separate builds of my project. | 12:35 |
|
moore33
| Then extract the parent/children info from that. | 12:35 |
|
jnl
| moore33: did you try --chlidren but without the max-count? | 12:36 |
| → rgr joined | 12:36 |
|
moore33
| azuk: Yeah, I get that :) and I realize that the parent-child relationship might be expensive to derive, but it's still useful. | 12:36 |
|
rgr
| sorry to ask obvious but need quick help. Just pulled a program from guit and it wont compile. How do I list last know "good" stage and then retrieve it? | 12:37 |
|
moore33
| Basically, I'm trying to answer the question: "What topic branches can be trivially merged to this branch?" Think maint in the git repo. | 12:37 |
| ← kbingham_ left | 12:38 |
| → drewr joined | 12:39 |
|
azuk
| moore33, you might want ^$sha1 instead of just $sha1 | 12:39 |
|
jnl
| moore33: you mean fast-forward? | 12:39 |
| ← peritus left | 12:39 |
|
moore33
| jnl: Yes. | 12:39 |
|
jnl
| moore33: isnt it easier to do it the other way? check which other branches contain this branch? | 12:40 |
|
| moore33: maybe merge-base is usefull | 12:42 |
| ← r0bby left | 12:42 |
|
jnl
| moore33: just a guess is that it should return the commit itself if the other branch is a ff | 12:42 |
|
moore33
| jnl: Yes, but they may contain other stuff too. To use the git repo example again, next merges frequently from maint. So a topic branch that was based from some commit in next may have the current maint head as an ancestor, but you can't merge it to maint without getting all the commits between maint and its ancestor on the next branch. | 12:42 |
|
| jnl: Yes, that's a good idea. | 12:43 |
| → faithfulgeek joined | 12:43 |
| → gilimanjaro joined | 12:43 |
|
gilimanjaro
| hello folks... | 12:44 |
| → cannonball joined | 12:44 |
|
rgr
| How can I find an old compilable "label" in my git? Sorry if terminology is not correct. I need to try and rewind to a compilable code base as master does not compile. | 12:44 |
| melvinram|away → melvinram | 12:44 |
| → apassi joined | 12:45 |
|
gilimanjaro
| i was wondering if anyone here knows how to do a 'git pull' for a branch i have not got currently checked out | 12:45 |
|
ekidd
| rgr: checkout HEAD^, HEAD^^, etc.? | 12:45 |
|
apassi
| git pull origin branch ? | 12:45 |
|
gilimanjaro
| (for the purpose of updating my local version with any remote changes, in preparation for a merge) | 12:45 |
|
| doesnt that pull it into my currently checked out branch? | 12:46 |
| → mcella joined | 12:46 |
|
apassi
| git pull origin remotebranch:localbranch | 12:46 |
|
moore33
| rgr: You might want to look at git bisect | 12:46 |
|
| biab | 12:46 |
|
gilimanjaro
| apassi: aha! excellent | 12:46 |
|
apassi
| gilimanjaro: i am not sure, i havent use that much but i pretty much think it should do it | 12:46 |
|
gilimanjaro
| it seems to work! in our case it would be 'git pull origin trunk:trunk' followed by 'git merge trunk' so i can incorporate the latest changes in our central repo in my branch development | 12:47 |
|
apassi
| my 'git svn rebase' didnt pass because conflict, i fixed it and committed, but now when i try to call 'git rebase --continue', it just response 'No changes - did you forget to use 'git add'?', and git svn rebase complains something it cannot create rebase-apply directory. how to solve git svn rebase conflict? | 12:49 |
| ← kanru left | 12:50 |
| ← levifig left | 12:50 |
|
apassi
| ok, git rebase --skip fixed it | 12:51 |
| ← error404notfound left | 12:51 |
| ← solydzajs left | 12:52 |
| → samsm joined | 12:58 |
| ← sporkmonger left | 12:58 |
|
deskin
| apassi: you don't use commit to resolve conflicts while rebasing; you just git add after editing the conflicted files and then git rebase continue | 12:59 |
| melvinram → melvinram|away | 13:00 |
|
deskin
| er --continue; at any rate, if you're happy how things turned out, you can rm the rebase directory (or rebase-apply) from .git; or, you can git rebase --abort and redo it properly | 13:00 |
|
apassi
| deskin: ah, great to know =) thankx | 13:01 |
|
deskin
| be sure you aren't on a detached head now, which is the usual result of walking away in the middle of a rebase | 13:01 |
| → error404notfound joined | 13:01 |
| ← samsm left | 13:01 |
|
apassi
| it should be on head, i tried continue rebase after problems but there was no more left | 13:03 |
| melvinram|away → melvinram | 13:03 |
|
deskin
| ya, if you happened to be on the last commit, doing git commit and git rebase --skip is basically the same as doing git add && git rebase --continue | 13:03 |
| ← brink left | 13:04 |
|
deskin
| it might work earlier in the chain too, but it's still not the 'right' way :) | 13:04 |
|
| just do git branch and make sure your current branch (with a *) is an actual branch, not (no branch) | 13:05 |
|
apassi
| yeah it is master ;) | 13:06 |
|
| hmm.. what is "not (no branch)" ? =) | 13:06 |
|
chrisdone
| hey, before I go looking around, is it possible to disable git's tty colour output? I'm using it inside emacs's shell-mode, y'see | 13:07 |
|
apassi
| yeah, git-config | 13:07 |
|
deskin
| if you do git branch and see '* (no branch)' it means your HEAD is detached from a local branch- e.g. if you do git checkout origin/master or some other remote branch, this will happen | 13:07 |
|
chrisdone
| cheers | 13:07 |
| ← error404notfound left | 13:08 |
|
deskin
| you can still commit and do most things, but no branch head (like master) is getting updated to point to any new commits you make, so if you git checkout otherbranch, the commit has disappeared | 13:08 |
|
apassi
| chrisdone: there is lot's of properties for colors, i cant remember which you need, the manual specifies these. | 13:08 |
|
deskin
| you can still get it back via the HEAD reflog, but it's annoying | 13:08 |
| ← rgr left | 13:09 |
| → cmarcelo joined | 13:09 |
|
apassi
| deskin: ok, thanks for the hint, never seen this no branch :) | 13:09 |
|
chrisdone
| apassi: yeah, I think under git-status is what I'm looking for | 13:09 |
| ← muszek left | 13:09 |
|
chrisdone
| "color.status" :-) | 13:09 |
| ← svanlund left | 13:09 |
|
deskin
| if you do git branch in the middle of a rebase conflict, you'll see it | 13:09 |
|
apassi
| i must try that next time | 13:10 |
| ← mike_m left | 13:10 |
|
deskin
| which is why I was saying to make sure the rebase had finished, and your future dev work would go on an actual branch | 13:10 |
| → jackdempsey joined | 13:10 |
| → sosko joined | 13:10 |
| → mike_m joined | 13:10 |
|
apassi
| yeah, it would cause lots of gray for my hair.. =) | 13:12 |
|
sunoano
| what's the major difference in between 1.5 and 1.6? do have to read all the changelogs to figure that out ... | 13:13 |
| → error404notfound joined | 13:13 |
|
chrisdone
| hmm, nah colours isn't it. I really need to tell git to assume it's not in a tty at all. hrm | 13:14 |
|
charon
| sunoano: <HEAD:Documentation/RelNotes-1.6.0.txt> ? | 13:14 |
|
Gitbot
| [git RelNotes-1.6.0.txt]: http://tinyurl.com/6zwgca [blob] | 13:14 |
| ← Gitzilla left | 13:14 |
|
sunoano
| charon: ok, will just do that :) | 13:15 |
| → jrmuizel joined | 13:15 |
|
deskin
| chrisdone: perhaps --no-pager will also do something about colours? I seem to recall a message on the mailing list about this, let me look | 13:15 |
|
| 'this' = 'git from within emacs being strange' | 13:15 |
| ← luis left | 13:17 |
| → Ryback_ joined | 13:17 |
|
deskin
| hm, looks like that was about getting CR codes within emacs | 13:17 |
|
sosko
| hi all | 13:19 |
| melvinram → melvinram|away | 13:19 |
|
deskin
| chrisdone: not sure how useful it is, long list of messages, but http://thread.gmane.org/gmane.comp.version-control.git/106487/focus=108057 is what I was referring to | 13:19 |
| → vals_ joined | 13:19 |
| ← tango_ left | 13:20 |
| → awx joined | 13:20 |
| ← joshdavey left | 13:20 |
| ← ludde left | 13:24 |
|
sgronblo
| How do I interactively revert a file to only restore some of the modified sections? | 13:24 |
| → kbingham joined | 13:25 |
|
deskin
| sgronblo: git revert --no-commit && git reset HEAD && git add -p path/to/file | 13:25 |
| → Yuuhi joined | 13:25 |
|
deskin
| er, the revert needs a commit id to revert, but all the same | 13:26 |
|
sgronblo
| Ok I meant revert in the svn way | 13:26 |
|
| I don't need to undo a commit | 13:27 |
|
doener
| "unstage" is the probably the right term then | 13:27 |
|
sgronblo
| Aha | 13:27 |
|
doener
| and IIRC there's no way to do that, except for using git gui | 13:27 |
| vals_ → tango_ | 13:27 |
|
sosko
| i'm about to start using git in production environment... i'm working on some php framework... and i'd like to be able to setup my repository in some sort of "layers".. first, i need to be able to update framework itself, which provides basic skeleton that i put my files in. next, i have my own modules that i'd like to maintain separately (i read that git submodules are useful for that), and those modules have to be placed in existing directory | 13:27 |
|
sgronblo
| Hmm, but isnt staging defining what will be included in the next commit? | 13:27 |
|
doener
| sgronblo: ah, oh, well, you meant changing the version in the working tree | 13:28 |
|
| sgronblo: sorry, jumped to conclusions there | 13:28 |
|
sgronblo
| i did? :) | 13:28 |
|
| i'm looking for something like git checkout --interactive filename | 13:29 |
|
eikke
| is there any way, next to git-status (which has no useful exit code) to figure out whether there are changes in a tree compared to index/last commit? | 13:29 |
| → kanru joined | 13:29 |
|
doener
| sgronblo: I guess so? There are only two things you could mean, the working tree and the index, and the index would be staging/unstaging ;-) | 13:29 |
|
sosko
| provided by framework.. then, i have my own code, that also goes "on top" of existing code, in some folders.. and on top of all that, i need to be able to mark some code state as "production" or "development" so i can deploy that code on dev/prod servers respectively... | 13:29 |
|
deskin
| sgronblo: a not-recommended-but-should-work way would be to git commit && git checkout HEAD~1 -- path/to/file && git reset HEAD && git add -p path/to/file, then git commit --amend (maybe?) | 13:29 |
|
doener
| sgronblo: you could do: git reset -- file; git add -i file; *stage what you want to keep* git checkout -- file | 13:29 |
|
| sgronblo: the last checkout gets the version from the index into the working tree, so you keep exactly the stuff you staged | 13:30 |
|
sgronblo
| but... that looks so complicated for something that should be simple | 13:30 |
| Niamor7 → Niamor | 13:31 |
|
sgronblo
| it should work similar to git add -p | 13:31 |
|
| deskin ponders whether a switch-index-and-working-tree command would be useful | 13:32 |
|
doener
| sgronblo: hm, that add -p + checkout is easy enough for me, and for more complicated things, I have a script wrapping vimdiff | 13:32 |
|
sosko
| any hint about where to look for an answer to similar question? | 13:33 |
|
deskin
| actually I think something crazy could be done with stash --keep-index and reading some of the stash commits into the index, but it wouldn't be any less complicated; all it would give would be add -p in reverse | 13:34 |
|
sgronblo
| doener: so when you do the last git checkout -- file with the changes you want to keep staged, will that notice that you have staged changes for that file that are not in the file as it is in the working directory? | 13:35 |
| ← boto left | 13:37 |
| ← priidu left | 13:37 |
|
petaflot
| hello! I tried to nuke the master branch to "ignore" a few commits, and now I'm having a problem pulling from the repo. git's asking me to specify which branch it should merge | 13:37 |
| ← gilimanjaro left | 13:37 |
|
doener
| sgronblo: hm? That command replaces the file in the working tree with the version from the index | 13:37 |
|
ekidd
| petaflot: git checkout -b master origin/master may help if you've deleted master. | 13:38 |
|
| petaflot: For more complicated problems, you may need to edit .git/config directly. | 13:38 |
| → priidu joined | 13:38 |
|
ekidd
| It rather depends on exactly how you "nuked" the branch. | 13:39 |
|
sgronblo
| doener: ah and you already wrote that once. sorry. | 13:39 |
| → sporkmonger joined | 13:40 |
|
sgronblo
| then i guess i understand how that solution works and it doesnt seem that complicated. thanks for the advice. | 13:40 |
|
ndim
| Is it on purpose that "git svn clone" (git version 1.6.1.3) adds all SVN tags as remote branches instead of git tags? git-svn(1) does not say anything useful about it, apparently. | 13:41 |
| ← cmarcelo left | 13:41 |
|
doener
| ndim: tags in svn are just by convention | 13:41 |
| → davisp joined | 13:41 |
| ← EmilMedve left | 13:42 |
|
davisp
| Is there a way to make gitosis not require a config change for every repository? | 13:42 |
|
| err, every *new* repository that is | 13:42 |
|
petaflot
| ekidd: thanks! it worked like a charm | 13:42 |
|
doener
| ndim: and I've probably seen more "not so much of a tag"-tags in svn repos than such tags that you could sanely and directly convert to git tags | 13:42 |
|
ndim
| doener: OK, that makes sense. I knew the SVN-tags-as-convention part, but not the horrible state of real world SVN tags. Makes sense though. :) | 13:44 |
| → cmarcelo joined | 13:44 |
| → jolelion joined | 13:45 |
|
jolelion
| hello | 13:45 |
| ← cmarcelo left | 13:45 |
|
doener
| ndim: well, might be that I've just been exposed to the bad repos and got a wrong impression, but even a wrong "svn cp" invocation can cause svn to record metadata that makes it pratically impossible to figure out the right git commit to use for the tag | 13:46 |
|
| ndim: because then svn doesn't record the whole directory as a copy of some other directory at revision X, but some mix of file A at revision foo and file B at revision bar and so on | 13:47 |
|
ndim
| Urgh. | 13:47 |
|
| Sounds like something one does not really want to know. :) | 13:47 |
|
doener
| the most common reason probably being that the copy was done in a working copy or so, where files might be recorded as coming from different revisions, when you didn't do a "svn up" recently or whatever | 13:48 |
| → aisbaa joined | 13:48 |
|
doener
| and yeah, one really doesn't want to know that, makes you wanna scream if you think about it | 13:49 |
| → brough joined | 13:49 |
|
jolelion
| I'm going to use git for my development, me and my group of work are using openvpn to be connected together, as I can't use ssh for some reasons , is it possible to use NFS or SAMBA to access shared repositories ? | 13:49 |
|
| both linux and windows clients | 13:50 |
|
Grum
| it seems i've stumbled onto a bug with git-svn; where the clone will not see a certain branch deleted; what to do now? :( | 13:50 |
| ← girishr left | 13:50 |
|
doener
| Grum: hm? you mean in "git branch -r" the deleted branch is still there? That's expected | 13:51 |
| ← eean left | 13:51 |
|
Grum
| how is that expected? | 13:51 |
|
brough
| is is necessary to compress very large text files before checking into git, if space is a problem? I understand git does have excellent compression... | 13:51 |
|
doener
| Grum: the branch is not gone from svn either. In fact, you can't easily really delete branches from svn | 13:51 |
|
Grum
| there is an entry in the svn history which purges the branch | 13:52 |
|
| doener: svn rm branches/xxx | 13:52 |
|
doener
| Grum: and if you checkout the parent revision, the branch is still there | 13:52 |
|
| Grum: it's still in the repo | 13:52 |
| → RaySl joined | 13:52 |
|
doener
| it's just no longer in the later revisions | 13:52 |
|
Grum
| euhhmz but shouldn't that be reflected in the import in some way? | 13:52 |
|
| right now it just skips over the revision | 13:53 |
| → keystr0k joined | 13:53 |
|
Grum
| what if you would (in svn): make a mistake; delete the branch; recreate it and work on it | 13:53 |
|
| it seems that right now you will have a mixed up history | 13:53 |
|
keystr0k
| Can you change the message in a previous commit? I forgot to mention something in my last commit. | 13:53 |
|
Grum
| commit --amend afaik | 13:53 |
|
kadoban
| keystr0k: git commit --amend | 13:53 |
|
doener
| Grum: branches are very different in git. SVN is just one large versioned directory, everything else is by convention | 13:53 |
|
keystr0k
| kadoban, dang! | 13:54 |
|
jolelion
| is it possible to use git over NFS or SAMBA? | 13:54 |
|
doener
| Grum: git has "real" branches | 13:54 |
|
Grum
| doener: yeah i know | 13:54 |
|
| i want to get rid of svn asap | 13:54 |
| → a-priori joined | 13:54 |
|
Grum
| but while trying to migrate the data i stumbled onto this inconvenience | 13:54 |
|
doener
| Grum: if seeing that branch bothers you, you can just drop it, "git branch -r -d $whatever" | 13:54 |
| ← ekidd left | 13:54 |
|
Grum
| what happens if you remove the branch in git? | 13:54 |
|
doener
| Grum: or -D instead of -d if it wasn't merged | 13:55 |
|
Grum
| it also gets purged from history? | 13:55 |
| → esparkman joined | 13:55 |
|
moore33
| Is anybody here using git for a large tree of binary data e.g. art assets for a game? | 13:55 |
|
doener
| the reference is dropped, and once all reflog entries referencing the commits, and the purge delay has passed, git gc will kill the associated objects | 13:55 |
|
keystr0k
| kadoban, I amended my last commit message... tried a push and it failed... ? | 13:55 |
|
Grum
| doener: ah ok so in order to keep the branch alive in the history the delete gets skipped? | 13:56 |
| → scientes joined | 13:56 |
|
kadoban
| keystr0k: afaik you shouldn't change history (--amend, etc) on already pushed commits. there's a way to override it, but I don't know it | 13:56 |
|
doener
| Grum: yeah. Otherwise, you could argue that the import is incomplete, as some data that is in the svn repo is not in the git repo | 13:56 |
|
Grum
| yeah that makes sense :) | 13:56 |
|
keystr0k
| kadoban, I see... Mmmkay. thank you :) | 13:56 |
|
kadoban
| (someone smart here surely does, i'm not that great at git yet) | 13:57 |
|
Grum
| doener: would you happen to know a 'good way' to make a svn import a bit more 'git like' ? | 13:57 |
|
doener
| define "git like" ;-) | 13:57 |
|
Grum
| well erm ... branches end up in refs/remotes/xxx | 13:57 |
|
| shouldn't they be in refs/xxx if you'd used git from the start? | 13:58 |
|
jolelion
| Does anybody tried to use git over NFS or SAMBA | 13:58 |
|
| ? | 13:58 |
|
doener
| in refs/heads. But git-svn is (also) intended as a bidirectional gateway to a svn repo, so it's treated as a remote | 13:58 |
|
Grum
| doener: yeah i understand that; but i want to use it as a one time import | 13:59 |
|
doener
| after a one-shot import there's usually quite a bunch of stuff you want to clean up | 13:59 |
|
Grum
| there dont seem to be flags to support that | 13:59 |
|
| yeah indeed; that is what i am running into right now | 13:59 |
|
doener
| yeah, there's --no-metadata to avoid the git-svn-id crap, but that's about it | 13:59 |
|
Grum
| there are some config entries which need to be purged; git config --remove-section svn-remote.svn | 14:00 |
|
| and the branches moved; tags to be looked at | 14:00 |
|
| is there anything more i am forgetting ? :) | 14:01 |
| → ciskje joined | 14:01 |
|
doener
| unwanted branches deleted, eventually merges reconstructed (if you had any "real" merges in svn) | 14:01 |
|
Grum
| we actually used svk .. | 14:01 |
|
| so yeah we had merges | 14:01 |
|
| how do you mean 'reconstructed' ? | 14:01 |
|
doener
| so that you have actual merge commits in your git repo | 14:02 |
|
| i.e. commits with more than one parent | 14:02 |
|
Grum
| commit with 2 parents | 14:02 |
|
| ok that is something i need to test then how it is handled | 14:02 |
|
doener
| the easiest way to do that is probably to use grafts and then using filter-branch to make the changes permanent | 14:02 |
|
Grum
| grafts? (gitk?) | 14:03 |
|
doener
| grafts override the parents recorded in the commit object | 14:03 |
|
Grum
| mm | 14:03 |
|
doener
| let me get an example done real quick | 14:03 |
|
Grum
| git config --remove-section svn-remote.svn | 14:03 |
|
| mmeh fail copy | 14:03 |
|
| i found a page; http://community.livejournal.com/evan_tech/255341.html | 14:03 |
| ← ph^ left | 14:04 |
| → beket joined | 14:05 |
|
Arjen
| Hey Grum | 14:05 |
|
Grum
| ey Arjen :) | 14:05 |
|
doener
| yeah, but that's so non-graphical :-) | 14:05 |
|
Grum
| doener: if you have a better way .. at least to visually verify =) | 14:06 |
|
| planning to script it in either case | 14:06 |
| → welly joined | 14:07 |
|
JohnFlux
| Hey all. I made some commits locally, and now just did a 'git checkout <revision>' but now I want to go back to where I committed my revisions | 14:07 |
|
| the trouble is, I can't find my revisions! | 14:07 |
|
| git log | grep -i john shows nothing | 14:07 |
|
doener
| Grum: http://git.pastebin.com/m2a94a2fa | 14:07 |
|
| Grum: that script creates a repo like one you might get from git-svn | 14:08 |
|
| Grum: the last commit on master was actually a merge of side, but the commit doesn't represent that, as you can see in gitk | 14:08 |
|
dato
| charon: :) | 14:08 |
| ← davisp left | 14:08 |
|
doener
| Grum: then a graft is added to override the parents of that commit to turn it into a merge commit, and get the correct history | 14:09 |
| → ekidd joined | 14:09 |
|
Grum
| indeed; gitk sees the merge with 1 parent | 14:09 |
|
ekidd
| Grum: git-svn can import some kinds of deleted and recreated branches, but not always. | 14:09 |
|
Grum
| i assume it can import deleted and completely merged branches | 14:10 |
|
ekidd
| Grum: I've occasionally needed to fix up the messier corner cases using grafts and filter-branch | 14:10 |
|
doener
| Grum: the nice thing about grafts is that they are immediately effective, so you can check the results before doing the time-consuming filter-branch stuff | 14:10 |
| → krh joined | 14:11 |
| → willb joined | 14:11 |
|
JohnFlux
| I've lost my commits :( | 14:11 |
|
Grum
| yeah | 14:11 |
|
| ok; how can i make this change permanent now? | 14:11 |
|
JohnFlux
| I committed locally, then 'git checkout <revision>' and now I can't find my commits! | 14:11 |
|
Grum
| (i haven't used filter-branch yet) | 14:11 |
|
doener
| JohnFlux: if you do "git checkout <revision>" you get a detached HEAD | 14:12 |
|
| JohnFlux: if you had a branch checked out before that, just do "git checkout <branch>" | 14:12 |
|
kadoban
| JohnFlux: probably because you're no longer on the branch you made the commits at | 14:12 |
|
JohnFlux
| doener: how do I reattached it? | 14:12 |
|
ekidd
| JohnFlux: Try looking at gitk to see what's going on. | 14:12 |
|
JohnFlux
| doener: whatever that means :) | 14:12 |
|
doener
| JohnFlux: or you can lookup earlier states of HEAD using "git reflog" | 14:12 |
|
ekidd
| JohnFlux: git checkout branchname will take you back to a specific branch. | 14:12 |
|
kadoban
| JohnFlux: look at git reflog, and see what branch you came from. then do git checkout <branchname> | 14:12 |
| → obeattie joined | 14:13 |
|
jolelion
| Does anybody tried to use git over NFS or SAMBA ? | 14:13 |
|
bremner
| jolelion: people do from time to time. they don't get too much sympathy when it breaks | 14:14 |
|
Grum
| jolelion: i imagine you might have problems with nfs lockfiles but otherwise should (theoretically) be working? | 14:14 |
| ← error404notfound left | 14:14 |
|
JohnFlux
| doener: I can't find it in gitk, but I see it in git reflog | 14:15 |
|
| 0e26ef2... HEAD@{4}: My commit message | 14:15 |
|
obeattie
| Hi everyone, I have a question I hope will be fairly easy for someone. I have just merged from a branch to my master (successfully), but I now want to undo the merge. I imagine this is done with git rebase, but does anyone know how? :) | 14:15 |
|
jolelion
| Grum: thanks | 14:15 |
|
doener
| JohnFlux: just "gitk", or "gitk --all"? | 14:15 |
|
jolelion
| bremner: sorry but I don't understand what you say (my english is so bad) | 14:15 |
|
doener
| obeattie: not rebase, reset | 14:15 |
|
JohnFlux
| doener: I don't see it in gitk --all either | 14:16 |
|
doener
| obeattie: use "git reflog show master" to find the pre-merge state | 14:16 |
| → EmilMedve joined | 14:16 |
| → eean joined | 14:16 |
|
doener
| obeattie: the use "git reset --hard <entry_from_reflog>" to reset your branch back to that commit (you should have master checked out when you do that, of course) | 14:16 |
|
obeattie
| doener: Okay, thanks, so what do I look for in the reflog? | 14:17 |
|
doener
| obeattie: and the reset --hard drops uncommitted changes, so if you have any, you might want to stash them first | 14:17 |
| → ph^ joined | 14:17 |
| → kapone joined | 14:17 |
| ← hobodave_ left | 14:17 |
|
obeattie
| doener: Just so we're clear, I want the changes to remain on the original branch (which I haven't deleted) | 14:17 |
|
| doener: I'm going to merge them back in pretty much straight away | 14:17 |
|
doener
| obeattie: you want to find the entry for the pre-merge state, as I said | 14:18 |
|
obeattie
| doener: Okay | 14:18 |
|
doener
| obeattie: if that last thing you did was the merge, the master@{0} entry will say "master@{0}: commit (merge): ..." | 14:18 |
| → roger_padactor joined | 14:18 |
|
doener
| obeattie: so master@{1} is the state right before the merge | 14:18 |
| ← mcella left | 14:19 |
|
doener
| if you did anything else in the meantime, the number might be different now | 14:19 |
|
Grum
| jipes; filter-branch needs more examples =) | 14:19 |
|
obeattie
| doener: Crap, the merge commit isn't on the branch (the one I called master) -- the branch I'm on is a remote (SVN) branch | 14:19 |
|
roger_padactor
| hello, i installed git on my shared hosting account. everythin installed fine. but when i try to run the git command it sais command not found. so where and how do i put it in the env vars so i can use git? | 14:19 |
|
doener
| obeattie: hm? I don't think I understand what you mean | 14:20 |
|
obeattie
| doener: The "master" branch is actually the remote SVN branch, and when I switch to it I'm in "no branch" | 14:21 |
|
doener
| obeattie: so you already dcommitted the merge? | 14:21 |
|
obeattie
| doener: I've switched to/from a local branch since I did the merge, so now my merge commit is... missing | 14:21 |
|
| doener: No I haven't dcommitted it yet | 14:21 |
|
doener
| obeattie: ah, so you did the merge on a detached HEAD? Nothing to undo then... | 14:21 |
|
obeattie
| doener: Okay, so what would happen when I do dcommit? | 14:22 |
|
| doener: Is the merge ignored since the head was detatched? | 14:22 |
|
| doener: *detached | 14:22 |
|
| doener: --dry-run *doh* | 14:22 |
| → ehamberg joined | 14:22 |
|
doener
| obeattie: dcommit looks at the history of HEAD to figure out what to push to svn | 14:22 |
|
obeattie
| doener: Oh, nice, yeah it's not doing anything | 14:22 |
|
| doener: Wow that helps me a lot | 14:23 |
|
doener
| obeattie: doing that "git merge foo" on a detached HEAD doesn't affect any ref but HEAD | 14:23 |
|
| obeattie: and checking out anything else of course changes HEAD again | 14:23 |
| ← reprore left | 14:23 |
|
obeattie
| doener: yeah that's fantastic (in this case) | 14:23 |
|
doener
| obeattie: so the result of the merge is only kept in HEAD's reflog | 14:23 |
|
JohnFlux
| doener: I looked at git reflog, and found my last commit. I've now switched to that, and 'git branches -a' says that I'm now on '(no branch)' - I think that's why I was having problems | 14:23 |
|
doener
| yeah, it's great for integration testing | 14:23 |
| ← plasticine left | 14:24 |
|
obeattie
| doener: So what happens to the detached head? Will it get "cleaned up" at some point? | 14:24 |
|
JohnFlux
| doener: should I move back into the 'master' branch or something? | 14:24 |
|
doener
| JohnFlux: depends on what you want to achieve | 14:24 |
|
Grum
| doener: what would the proper filter-branch syntax be to make the grafts permanent? i got it working with HEAD^2..HEAD but erm .. i doubt that is proper ^^ | 14:24 |
|
doener
| Grum: for your case, probably just "git filter-branch -- --all", assuming that you have no (annotated) tags yet | 14:25 |
|
ekidd
| Grum: Usually something like 'git filter-branch --all' | 14:25 |
|
JohnFlux
| doener: at some point I want to push my changes back upstream | 14:25 |
|
ekidd
| Yeah, use the extra '--' in there. | 14:25 |
|
doener
| obeattie, JohnFlux: HEAD is a special reference that stores what you have checked out | 14:25 |
|
Grum
| and after that purging refs/original and info/grafts manually? | 14:25 |
|
ekidd
| JohnFlux: Once you've rewritten, your only real option is to nuke upstream, and all the existing checkouts. | 14:25 |
|
doener
| obeattie, JohnFlux: when you check out a branch head (i.e. one of the things that "git branch" shows), then HEAD will reference that branch head | 14:26 |
|
ekidd
| JohnFlux: Whoops, sorry. Got two people confused. :-/ | 14:26 |
|
JohnFlux
| ekidd: I was wondering :) | 14:26 |
|
obeattie
| doener: Yeah I know that, sorry I'm not too good at explaining what I mean | 14:26 |
| ← faithfulgeek left | 14:26 |
|
doener
| obeattie, JohnFlux: and doing "git commit" or "git merge" or whatever, will affect that branch head | 14:26 |
|
| obeattie, JohnFlux: when you checkout anything else, HEAD will reference a commit, and "git commit" etc. will update HEAD itself to reference the new commit | 14:26 |
|
obeattie
| doener: Uuh I mean... what happens to the (then) head that I merged into in the first place? I can't see I have any way of making that my current head again | 14:27 |
|
| doener: I don't want to, I'm just curious :) | 14:27 |
|
doener
| obeattie, JohnFlux: if you then checkout something else again, HEAD is changed, and so there's no ref left referencing that commit | 14:27 |
|
| obeattie, JohnFlux: then, only the reflog is still referencing it, and once that expires, git gc may prune it | 14:27 |
| ← jolelion left | 14:27 |
|
doener
| because the commits became unreachable | 14:27 |
|
ekidd
| Yay, reflog. | 14:27 |
|
obeattie
| doener: Right okay I see, that's what I meant :) | 14:28 |
| ← rraasch left | 14:28 |
|
obeattie
| doener: Thanks so much for your help anyway | 14:28 |
|
doener
| JohnFlux: so in your case, you might want to create a branch head from that commit, using "git branch <name> <commit-id>" | 14:28 |
|
| JohnFlux: or just merge the thing into one of your branches, using "git checkout <your_branch>; git merge <commit-id>" | 14:29 |
| → levifig joined | 14:29 |
|
Grum
| doener: seems the cleaning of the few files will indeed clean it up; thanks for the very nice script to display how it worked ^^ | 14:29 |
|
doener
| JohnFlux: or both of those, or just cherry-pick some commits you made while you were on a detached HEAD, or whatever | 14:29 |
| → levifig_ joined | 14:29 |
|
JohnFlux
| doener: so, at the moment my commits are in 'no branch' can I just do 'git merge master' ? | 14:29 |
|
doener
| JohnFlux: that would merge master into what you have checked out, not affecting master at all | 14:30 |
| cbrake_away → cbrake | 14:30 |
|
JohnFlux
| doener: I keep getting the feeling that I'm doing this wrong or something. This is so complicated compared to what I was doing with mercurial | 14:31 |
| ← Hendu left | 14:31 |
|
JohnFlux
| doener: in mercurial, I could just check out, make commits, check out again to update, and so on | 14:31 |
|
| but in git I seem to keep disconnecting from master.. but why? | 14:31 |
|
| am i doing something wrong which causes me to disconnect from master? | 14:32 |
|
doener
| because you checkout a commit | 14:32 |
|
JohnFlux
| doener: right, but that commit is still on master | 14:32 |
|
| so shouldn't I still be on master? | 14:32 |
|
kadoban
| JohnFlux: but you aren't anymore if you checkout a random commit | 14:32 |
|
doener
| "master" is just the branch head, it is a reference to a single commit | 14:32 |
| ← levifig_ left | 14:32 |
| ← jackdempsey left | 14:32 |
| ← levifig left | 14:33 |
|
Grum
| what would be the proper way to let head point at whatever was in the trunk after a 'git svn clone'? | 14:33 |
| ← obeattie left | 14:33 |
|
doener
| Grum: head == HEAD, or a the currently checked out branch head? | 14:33 |
| ← UnwashedMeme left | 14:33 |
|
doener
| Grum: or even some other branch head? | 14:33 |
| ← sosko left | 14:34 |
| ← keystr0k left | 14:34 |
|
Grum
| i mean HEAD :) | 14:34 |
| ← lorandi left | 14:34 |
|
doener
| git checkout svn/trunk # Or whatever the remote tracking branch is called | 14:35 |
|
| but I suspect you actually mean the checked out branch head ;-) | 14:35 |
| → lorandi joined | 14:35 |
|
doener
| (though strictly, HEAD^0 ends up the same) | 14:35 |
|
Grum
| ... i just want to have a repository which looks like as it had been made with git all along | 14:35 |
|
| but currently i'm stuck with svn ^^ | 14:36 |
|
doener
| Grum: e.g. you can use "git reset --hard svn/trunk" to move the checked out branch head to the same commit as svn/trunk | 14:36 |
|
| Grum: so after "git svn clone" you have a branch head "master", that will reference the latest commit on the branch that was last changed in svn | 14:36 |
|
Grum
| yeah | 14:36 |
|
| and that happens to be a branch's head | 14:36 |
| → LiamH joined | 14:36 |
|
doener
| Grum: and then you can do "git reset --hard svn/trunk" to make master reference the same commit as svn/trunk | 14:37 |
| ← priidu left | 14:37 |
|
doener
| Grum: because after the git svn clone, HEAD references refs/heads/master, and thus the reset changes refs/heads/master | 14:37 |
|
Grum
| k | 14:37 |
|
| thanks once more :) | 14:37 |
|
doener
| Grum: changing HEAD to reference the latest commit from the trunk would mean "git checkout svn/trunk", and that detach HEAD and not affect refs/heads/master at all | 14:38 |
| → mncaudill joined | 14:38 |
|
Grum
| yeah that is the effect it had with my tries before | 14:39 |
| ← kbingham left | 14:39 |
|
Grum
| after that i just need to do a bare-clone so i can put it on some central place others can clone from right? | 14:39 |
| → kbingham joined | 14:39 |
| → bdiego joined | 14:39 |
| → mattenoble_ joined | 14:39 |
| → mcella joined | 14:39 |
| ← mattenoble_ left | 14:40 |
|
doener
| Grum: yeah, either that, or create a bare repo and push to it. For probably totally insane reasons, I prefer the latter ;-) | 14:41 |
| ← kapone left | 14:41 |
| ← tek0 left | 14:41 |
|
Grum
| well then i test the transport as well | 14:41 |
|
| and i can impress my coworkers with the awesome speed | 14:42 |
|
doener
| Grum: oh, and you should do some purging/repacking | 14:42 |
| → nick_h[litage] joined | 14:42 |
| → tek0 joined | 14:42 |
|
Grum
| just call git gc; git repack ? or any more special stuff? | 14:42 |
|
doener
| http://n2.nabble.com/purging-unwanted-history-td1507638.html | 14:43 |
|
| second posting | 14:43 |
|
| filter-branch leaves backup references, for the case that anything goes wrong, so you need to get rid of them | 14:43 |
| ← warthog9 left | 14:43 |
|
Arjen
| The reflog stuff and a gc --aggressive | 14:43 |
|
doener
| and the reflogs likely also keep the old stuff around, so that also needs cleaning | 14:44 |
| → aziz joined | 14:44 |
| dmlloyd_ → dmlloyd | 14:44 |
|
Grum
| doener: yeah i saw the 'refs/original' | 14:44 |
|
doener
| Grum: of course the filter-branch invocation itself in that posting is uninteresting for you, just from the "git for-each-ref" onwards | 14:45 |
|
Grum
| yeah i gathered that :) | 14:45 |
|
doener
| Grum: and using -adf _might_ produce somewhat better results than -ad in some cases | 14:45 |
| → qrush_ joined | 14:45 |
| → gaveen joined | 14:45 |
| ← jrmuizel left | 14:46 |
| → parasti joined | 14:46 |
| → boto joined | 14:47 |
|
roger_padactor
| so how do i get git the git command to work if it doesn't on install | 14:48 |
|
doener
| Arjen: using "git gc --aggressive" would do a "repack -Adf" there (unless you set gc.pruneexpire to "now") causing unreachable objects to be forced to be loose. That would cause quite some useless IO action | 14:48 |
| → priidu joined | 14:49 |
|
doener
| Arjen: as you'd want a "git prune" afterwards anyway, to get rid of the objects | 14:49 |
|
Arjen
| Ah, right | 14:49 |
| → Hink joined | 14:50 |
| → faithfulgeek joined | 14:50 |
| → reprore joined | 14:54 |
|
qrush_
| roger_padactor: um, define not work...perhaps it's just not on your PATH | 14:54 |
| ← reprore left | 14:55 |
|
roger_padactor
| when i type git , i get i get command not found | 14:56 |
|
| what should my path look like and how do i set it? | 14:56 |
| → nerochiaro joined | 14:56 |
|
roger_padactor
| i added expost PATH=$PATH:/path/to/bin to my .bashrc file. didn't seem to do anything | 14:57 |
|
| export* | 14:58 |
|
nerochiaro
| hi all, i have a newbie question: is there a way to run a git command from outside the git repo tree ? something like "git status --repo=/my/repo" ? apologies if this is the wrong place to ask | 14:59 |
|
Grum
| just chdir to the repo? | 15:00 |
| → warthog9 joined | 15:00 |
|
nerochiaro
| Grum: of course. but let's assume i can't do that, is there any other way ? | 15:00 |
|
Grum
| mmm you can set GIT_DIR i think (not sure what it is called) | 15:01 |
| ← reithi left | 15:02 |
|
Grum
| so you could probably do: GIT_DIR=/my/repo git status | 15:02 |
|
| or not ;( | 15:03 |
|
nerochiaro
| yeah, that works | 15:03 |
|
| thanks | 15:03 |
| dwmw2_gone → dwmw2 | 15:04 |
| → xuhao joined | 15:04 |
|
Grum
| mm didnt work here; but i do see that my git has [--git-dir=GIT_DIR] | 15:04 |
|
| prolly a version difference? | 15:04 |
|
| seems i have to point it a the .git dir (not in a bare repo here) | 15:06 |
|
nerochiaro
| yes, i was about to say that | 15:07 |
| ← awarde_ left | 15:07 |
|
nerochiaro
| and here --git-dir doesn't work | 15:07 |
|
Grum
| both work here; got 1.6.1.3 | 15:07 |
|
nerochiaro
| i'm on 1.5.6.3, that may be why | 15:08 |
|
doener
| nerochiaro: you need "git --git-dir=... <command>" not "git <command> --git-dir=..." | 15:08 |
|
| nerochiaro: and for things like "status" you'll also want --work-tree | 15:08 |
|
nerochiaro
| doener: excellent, that work for me | 15:09 |
| → cmarcelo joined | 15:11 |
|
Grum
| man this migration from svn will be quite some work :D | 15:11 |
|
PerlJam
| Grum: but worth it! | 15:11 |
|
Arjen
| At least it's doable | 15:11 |
|
Grum
| i wonder what kind of nasties i will find from the cvs->svn migration :( | 15:12 |
| → spearce joined | 15:12 |
|
Grum
| Arjen: doable but a lot of manual work still | 15:12 |
| → awarde joined | 15:12 |
| ← awarde left | 15:13 |
|
nerochiaro
| hmm, another question: is it possible for git-rev-list to list only the commits that touch a certain subdirectory ? | 15:14 |
|
| that change files inside a certain subdirectory, i mean | 15:15 |
|
doener
| git rev-list ... -- directory | 15:15 |
| → levifig joined | 15:16 |
| ← countd left | 15:17 |
|
WhatAHam
| how do i undo the changes to my working copy and go back to the last commit?!? | 15:18 |
|
nerochiaro
| doener: excellent, thanks | 15:18 |
| → hobodave joined | 15:19 |
| ← hobodave left | 15:19 |
|
doener
| WhatAHam: "git reset --hard" if you want to drop all changes | 15:19 |
| → mikl joined | 15:19 |
| → hobodave joined | 15:19 |
|
doener
| WhatAHam: "git checkout -- file" to get the version from the index into the working tree | 15:19 |
|
WhatAHam
| ok so git checkout | 15:19 |
|
| ok | 15:19 |
|
doener
| WhatAHam: "git checkout HEAD -- file" to get the version from HEAD into the index and working tree | 15:19 |
|
WhatAHam
| what's the index? | 15:20 |
|
| haha | 15:20 |
|
| WhatAHam ducks | 15:20 |
| → loincloth joined | 15:20 |
| ← ekidd left | 15:21 |
| ← charon left | 15:21 |
| ← hpa left | 15:22 |
| → eventualbuddha joined | 15:22 |
|
roger_padactor
| so putting PATH=$PATH:$HOME/bin in my .bash_profile doesn't get git command to work. any other ideas? | 15:23 |
| → brink joined | 15:23 |
|
roger_padactor
| so i have to restart something for it to take effect? | 15:23 |
|
vmiklos
| logout and login | 15:23 |
|
un|ogic
| wait | 15:24 |
|
PerlJam
| re-run your .bash_profile | 15:24 |
|
vmiklos
| or just 'source ~/.bash_profile' | 15:24 |
|
un|ogic
| just source your bash_profile | 15:24 |
|
doener
| or put that into .bashrc instead of .bash_profile | 15:24 |
|
roger_padactor
| its in both | 15:24 |
|
un|ogic
| or do a setenv | 15:24 |
|
| :P | 15:24 |
|
| wait, bash.. export then | 15:24 |
|
roger_padactor
| its exported | 15:25 |
|
brink
| What's the best way to permanently remove a directory of large binaries so they don't take up space? | 15:25 |
|
doener
| then new bash processes should have that path... what does "echo $PATH" tell? | 15:25 |
|
un|ogic
| echo $PATH shows it's there? | 15:25 |
| → cilly joined | 15:25 |
| ← beket left | 15:26 |
|
roger_padactor
| its not in the path | 15:26 |
|
| so its not set | 15:26 |
|
| damn thing | 15:27 |
|
| um what is source ? | 15:28 |
| → beket joined | 15:28 |
| → jrmuizel joined | 15:30 |
|
roger_padactor
| ok that sourcing thing worked... so how do i get it to work on login | 15:30 |
| ← cedricv left | 15:30 |
| ← a-priori left | 15:31 |
| → charon joined | 15:33 |
| ← merlin83 left | 15:34 |
|
jaalto
| brink asked interesting question: What's the best way to permanently remove a directory of large binaries so they don't take up space? | 15:36 |
|
| E.g if you decide to split a repository in two and you don't care about the old history (pdf files, images ...) | 15:37 |
| ← drizzd left | 15:37 |
| → ekidd joined | 15:38 |
|
brink
| jaalto: Yes, I have 8M of code and 84M of binaries. Splitting this into two repositories would be a good solution. I don't care about the binary history. | 15:38 |
|
| jaalto: Of course, I don't know how to split it. | 15:39 |
|
charon
| jaalto, brink: man git-filter-branch | 15:39 |
|
Gitbot
| jaalto: the git-filter-branch manpage can be found at http://git.or.cz/man/git-filter-branch | 15:39 |
|
brink
| charon: Yes. I've tried that often. Maybe I'm missing something, but I've failed to find an incantation with git-filter branch that actually reduces the size of the repository. | 15:40 |
|
jaalto
| charon: Doesn't that also copy history? I'd like to remove the old binaries permanently from current repo | 15:41 |
| ← JohnFlux left | 15:41 |
| ← Sho_ left | 15:41 |
|
PerlJam
| brink: did you remember to remove the backup refs after you ran filter-branch ? | 15:42 |
|
charon
| you'll have to force-expire everything after the filtering, something like 'rm -rf .git/refs/original; git reflog expire --expire=now --all; git gc; git prune --expire=now' | 15:42 |
|
| obviously that removes all safety nets so make sure you have a backup | 15:42 |
|
| might be easier to just clone the repo however. | 15:42 |
|
brink
| charon: Not worried. I do this in a test clone. | 15:43 |
|
charon
| jaalto: all rewriting always copies; as Tv put it, you cannot change, only rewrite and forget. if you fail to forget, of course you'll have the old stuff around too | 15:43 |
| → error404notfound joined | 15:43 |
| → cedricv joined | 15:43 |
|
jaalto
| charon: so if you copy the binaries to complely fresh repo (no split; start at zero), and 'rm <files>' from old repo, is there any way to completely wipe the old history? | 15:46 |
|
brink
| charon: I just tried each of those incantation. After each du -h gave the same answer - a whopping 149M | 15:46 |
| ← ntoll left | 15:47 |
|
charon
| brink: make sure you've really got rid of all refs pointing to the old history | 15:47 |
| ← _Vi left | 15:47 |
| → girishr joined | 15:47 |
|
charon
| brink: for example say 'git log --all -- $some_large_file'; if that returns anything you still have some refs lying around | 15:47 |
|
brink
| charon: Is there method for doing that? | 15:47 |
|
charon
| after finding some sha1 you can use 'git branch --contains $sha1' and 'git tag --contains $sha1' to find the offenders (the latter is only in very recent git however) | 15:48 |
| ← beket left | 15:48 |
|
brink
| charon: I have git 1.5.4. Is that recent enough? | 15:49 |
|
charon
| uh... i doubt you'll even have 'branch --contains' at 1.5.4 | 15:49 |
| ← chalky left | 15:49 |
| → sitaram joined | 15:49 |
|
charon
| oh, you do. branch --contains is in since v1.5.4-rc0 and tag --contains since v1.6.2-rc0 (i.e. not released yet) | 15:50 |
|
brink
| charon: That's the latest on mac ports. On Ubuntu I have 1.5.2.5, which seems to be the latest in my current set of universes. | 15:50 |
|
charon
| but in any case, you can check if any tags still have the file with 'git log --tags -- $file' and if so, you probably forgot --tag-name-filter cat and they _all_ still point to the old history. | 15:51 |
| ← johan-s left | 15:51 |
|
brink
| charon: I have no tags. It's all from a ghetto model SVN repository. | 15:51 |
| ← girishr left | 15:51 |
|
charon
| brink: so did you filter the remotes? what does 'git branch -a --contains $sha1' say? | 15:52 |
| → error404notfoun1 joined | 15:53 |
| → HenryHuang joined | 15:54 |
|
brink
| charon: I just took a subdirectory of the trunk. Unfortunately, that included a sub-sub directory of binaries. | 15:54 |
| → rostedt joined | 15:54 |
|
brink
| charon: Is there a quick way to find the sha1 of a file? | 15:55 |
|
charon
| brink: umm, you need a commit sha1 for branch --contains. that's why i said to log --all -- $file earlier. (the real answer is git hash-object) | 15:55 |
| ← aziz left | 15:56 |
|
brink
| charon: Ok. So I can just do git log filename to find the sha1. Is that correct? | 15:57 |
| → ashleyw joined | 15:57 |
|
charon
| you can use 'log -- filename' to find the sha1 of _some_ commit that touches the file, yes. | 15:57 |
|
rostedt
| hi all. I was wondering about a new little feature. I find that often after pushing to a public git repo, I receive acked-by and tested-by on a commit | 15:57 |
|
charon
| brink: as for your subdirectory, re-filter with '--index-filter "git rm -r --cached --ignore-unmatch $subsubdir"' if you want to remove it. the gfb manpage has more details. | 15:58 |
| ← kadoban left | 15:58 |
|
rostedt
| is there some kind of "amendment" feature to add to a change log of a commit after it has been pushed? | 15:58 |
|
| not actually changing the change log, but to just add a comment to it that can be seen by a 'git log' | 15:58 |
|
charon
| rostedt: currently not without rewriting history. man git-notes could help you but it's probably not going to make it into 1.6.2 | 15:59 |
|
Gitbot
| rostedt: the git-notes manpage can be found at http://git.or.cz/man/git-notes | 15:59 |
|
brink
| charon: Ok, the git branch -a --contains sha1 says it exists in origin/HEAD and origin/master, but in the original git repo it's also in master. | 16:01 |
| ← RaySl left | 16:02 |
| offby1` → offby1 | 16:02 |
|
rostedt
| charon: thanks | 16:02 |
|
charon
| brink: you probably didn't filter the remotes. you could just delete the remote to get rid of its origin/* branches. | 16:02 |
| ← error404notfound left | 16:02 |
| ← drewr left | 16:04 |
| → krawek joined | 16:05 |
|
brink
| charon: I just did git remote rm origin. Still the same size though. | 16:05 |
|
charon
| it won't magically throw away objects, you'll have to repeat my "incantation" | 16:05 |
| → moore_ joined | 16:05 |
|
charon
| (or maybe i just forgot some part of the forget-everything-dance) | 16:05 |
|
brink
| charon: git prune says this: error: refs/remotes/origin/HEAD points nowhere! | 16:07 |
| ← moore33 left | 16:07 |
| → greyface joined | 16:07 |
|
charon
| hrm. bug in git-remote? you can remove it manually with 'rm .git/refs/remotes/origin/HEAD' | 16:09 |
|
doener
| yeah, there was(?) a bug with deleting symbolic refs, the referenced ref was deleted instead | 16:10 |
|
brink
| charon: That fixed the error. After prune it's still all 149M. | 16:11 |
|
| charon wonders what he forgot this time | 16:11 |
|
charon
| brink: can you check 'git log --all -- $file' for some big file again? it should come up empty if you got rid of all refs | 16:11 |
|
| (refs pointing to the old history, that is) | 16:11 |
|
brink
| charon: Do I need the full path to the file? | 16:12 |
| → muthu_ joined | 16:12 |
|
charon
| yes. | 16:12 |
|
doener
| charon: which cleanup dance did you suggest? | 16:12 |
|
charon
| doener: [16:42] <charon> you'll have to force-expire everything after the filtering, something like 'rm -rf .git/refs/original; git reflog expire --expire=now --all; git gc; git prune --expire=now' | 16:12 |
|
doener
| should be fine, except that I use "git repack -ad" instead of "git gc" (stops the unreachable objects from being written as loose objects -> faster) | 16:13 |
|
charon
| ah, good idea | 16:13 |
|
| i'm actually writing a section for man:gfb now. this comes up every week :( | 16:14 |
|
doener
| the most common reason for the repo still being big is that the files have been moved/renamed, and now you don't remember the old names | 16:14 |
|
brink
| charon: yes. That prints out the reference to the commit. | 16:14 |
|
doener
| *yawn* the irc log search is slow again :-/ | 16:15 |
|
brink
| charon: It has a git-svn-id. | 16:16 |
|
charon
| brink: then go back to finding a ref that points to the commit. if 'git branch -a --contains $sha1' doesn't show any branch, it's probably a tag. | 16:16 |
| ← tim_jenssen left | 16:16 |
|
brink
| charon: Yes git branch -a doesn't find it. How do I find a ref that points to the commit? | 16:17 |
| ← mfilipe left | 16:17 |
|
doener
| hm, why bother with finding a ref? Just filtering with " -- --all" catches everything | 16:18 |
| → mfilipe joined | 16:18 |
|
doener
| brink: just in case that the files have been renamed or so: | 16:19 |
|
| git rev-list --objects --all | cut -f1 -d' ' | git cat-file --batch-check | grep blob | sort -n -k 3 | tail -n10 | while read hash type size; do echo -n "$size "; git rev-list --all --objects | grep $hash | cut -d' ' -f2- ; done | 16:19 |
|
| brink: that monstrosity tells you the filenames used for the ten biggest blobs in your repo | 16:19 |
| → reprore joined | 16:20 |
|
Grum
| how can i find the branchpoint of a branch that i just know the name off? | 16:20 |
|
brink
| doener: I'm getting this: usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1> | 16:20 |
|
doener
| brink: old git? Might need 1.6 or so | 16:21 |
|
charon
| Grum: branches have no intrinsic branch point, they just have a merge-base w.r.t. some _other_ branch. you can find that with git merge-base $branch $other | 16:22 |
|
brink
| doener: On Mac I'm at 1.5.4 and on Ubuntu I'm at 1.5.2.5. Those are the latests via port install and apt-get. Should I bypass mac ports and Ubuntu Universes somehow? Should I build it myself? | 16:22 |
| ← bram left | 16:23 |
| → stephenlb joined | 16:23 |
| → GeertB joined | 16:24 |
|
doener
| brink: I'm usually running a self-built git from git.git's master. IIRC for Ubuntu there are newer packages available "somewhere" | 16:25 |
|
| brink: at that ubuntu version is _definitely_ worth upgrading. 1.5.2 is almost 2 years old, and there have been just too many improvements to still use that old thing | 16:26 |
|
| s/at/and/ | 16:26 |
| ← reprore left | 16:26 |
|
charon
| on my debian box i just downloaded the git-core package from unstable and installed it manually, worked fine | 16:27 |
| → outoftime joined | 16:27 |
|
charon
| (you'll want to update gitk etc. too, but that one's headless and i only cared about the tools) | 16:27 |
|
outoftime
| is there a way to get a log-type summary of all of the commits that are in one branch, but not in another? | 16:27 |
|
| (like a git-diff, but showing the commit logs rather than the actual diff) | 16:27 |
| ← rostedt left | 16:28 |
| ← mfilipe left | 16:29 |
| → drewr joined | 16:30 |
| → mfilipe joined | 16:30 |
| → Hendu joined | 16:30 |
| ← giallu left | 16:30 |
| → Bass10 joined | 16:31 |
|
charon
| doener: how about http://gist.github.com/63983 ? | 16:32 |
| → edwardam joined | 16:32 |
| ← eean left | 16:32 |
| → eean joined | 16:33 |
| → Voker57 joined | 16:33 |
| → chris2 joined | 16:33 |
| → qrush__ joined | 16:35 |
| → nothinghappens joined | 16:35 |
| → kadoban joined | 16:37 |
| ← Korren left | 16:37 |
| → ashleyw_ joined | 16:38 |
| → mansour joined | 16:38 |
|
mansour
| I have added "*.o" to my .gitignore. However, I couldn't find a way to do d this in all directories. Do I need to put this in every directory ? | 16:39 |
| ← qrush__ left | 16:39 |
|
ekidd
| mansour: Just once, at the top level of your project. | 16:39 |
|
doener
| mansour: no, unless there's a slash in there, the rule works recursively for all subdirectories | 16:40 |
| ← naeu left | 16:40 |
|
Grum
| hmm so what is .git/info/exclude used for? | 16:40 |
|
doener
| mansour: and "dir/" works also in all subdirs, as that just means that "dir" must be a directory, not a file, and does not anchor the pattern | 16:40 |
|
| Grum: same as .gitignore, but for things you want to ignore locally | 16:41 |
|
| Grum: .gitignore is the tracked version, that you can commit so everyone has it | 16:41 |
|
Grum
| hmm for example if you are using a different editor which leaves ~ files orso? | 16:41 |
|
doener
| yeah, or if you have any other funny tools, that leave e.g. directory index files, or something else that not the whole world will care about | 16:42 |
|
Grum
| is there any way to find the most recent branchpoint of a branch? | 16:42 |
|
doener
| you can find the merge base of two branches | 16:42 |
|
Grum
| yeah git mergebase does that but i dont know what it forked from | 16:43 |
| → reprore joined | 16:43 |
| → kapone joined | 16:43 |
|
mansour
| ok, so do I need to put a slash only? like this ?? *.o/ ??!! | 16:43 |
| ← qrush_ left | 16:43 |
| → qrush_ joined | 16:44 |
|
doener
| mansour: no... that would mean that only directories ending in .o would be ignored | 16:44 |
|
| mansour: just *.o is already fine | 16:44 |
| → akitada_ joined | 16:44 |
| ← lresende left | 16:45 |
| ← akitada_ left | 16:46 |
| → solydzajs joined | 16:46 |
|
mansour
| doener: thank you. I just tried it. | 16:46 |
| ← ashleyw left | 16:46 |
|
mansour
| so, if I have multiple modules, and I want to ignore a dir called target in each of them, all I have ot do is "target/", right / | 16:47 |
|
| right ? | 16:47 |
| → RaySl joined | 16:48 |
|
doener
| modules == submodules? | 16:48 |
|
ekidd
| Is there a good way to iterate over two lists in parallel when using shell scripts? | 16:48 |
|
| ekidd is working on git patch | 16:48 |
|
mansour
| hum, no. I missed this part. I forgot git has submodules keyword. I have few subdirectories and each of them contains "target" | 16:49 |
|
| I need to ignore this "target" dir always. | 16:49 |
|
doener
| yep, just "target/" in a top-level .gitignore should be fine | 16:49 |
|
ekidd
| Or even /target/, I think. | 16:50 |
|
doener
| charon: hm, maybe you should mention that "git clone /path/to/repo" won't do the trick, as that just hardlinks everything | 16:50 |
|
mansour
| cool, for some odd reason I had to put .gitignore in each module directory ... I will go back again sometime and double check this | 16:50 |
| ← cilly left | 16:51 |
|
doener
| ekidd: no, that anchors the pattern, thus it won't ignore the directory in any subdirectory | 16:51 |
|
ekidd
| Oh, sorry. | 16:51 |
|
| I wasn't paying enough attention. :-( | 16:51 |
| → tor3 joined | 16:51 |
| → akitada joined | 16:51 |
| ← sitaram left | 16:52 |
|
charon
| doener: true, i forgot. using file:// should do it, right? | 16:52 |
|
Grum
| doener: you know of now way to see where a branch forked from if you dont know the branch it came from? | 16:52 |
|
doener
| charon: I think so, I always forget how to force the pack generation. And the "rm -rf .git/refs/original" will fail when the refs got packed for some reason (e.g. earlier packing attempts) | 16:53 |
|
Grum
| it seems like you have to find the closest parent which has >1 children | 16:53 |
| → jordibunster joined | 16:53 |
|
doener
| Grum: git doesn't really have a "branched from" concept in its object model, unlike svn | 16:53 |
|
xenoterracide
| does git format-patch have a -m switch? where could I find the docs on it? I'm wondering if I've been screwing up patches... also where the -M option documented? | 16:54 |
|
Grum
| yeah i know; but the 'parent with multiple children' is what i am looking for; is there any way to easily get that information? | 16:54 |
|
| or hard ... ;D | 16:54 |
|
jordibunster
| My prompt makes use of git status to see if there's anything dirty, anything untracked, and anything staged. Any way to do it faster than git status? | 16:55 |
|
Grum
| or mmm i could just bruteforce a mergebase on all of the other refs i have; and pick the one with the least revisions between me and the mergebase found | 16:55 |
|
qrush_
| jordibunster: mind control | 16:55 |
|
doener
| Grum: that might as well give you a commit at which another branch was created from this branch | 16:55 |
| → kukks joined | 16:56 |
|
Grum
| doener: true .. mmm | 16:56 |
| ← alip left | 16:56 |
|
jordibunster
| qrush: I was thinking something that stops as soon as it finds one of each. | 16:56 |
| ← reprore left | 16:56 |
|
charon
| Grum: git rev-list --boundary HEAD --not $(git for-each-ref refs/heads/ --format='%(refname)' | grep -v $(git symbolic-ref HEAD)) | sed-ne 's/^-\(.*\)/\1/p' | 16:56 |
| → alip joined | 16:57 |
|
charon
| gives you the most recent commit common with any other branch | 16:57 |
|
Grum
| i so need to decypher that hehehe | 16:57 |
|
bentob0x
| how do you 'pull' single commits from an external project on your local machine? | 16:57 |
|
charon
| Grum: afterwards 'git branch --contains $sha1_from_above' is probably the most helpful | 16:57 |
| → orlandov joined | 16:58 |
|
charon
| note that it's more or less the same as brute-forcing the merge-base as you suggested, except it's much faster | 16:58 |
| → reprore joined | 16:58 |
|
Grum
| mmm i am only missing where to put the input-branch | 16:58 |
|
| (or commit even) | 16:59 |
| ← galderz left | 16:59 |
|
charon
| where i wrote HEAD | 16:59 |
|
| (so you could also just check it out) | 16:59 |
|
Grum
| i tried; it gives nothing for me | 16:59 |
| → awarde joined | 17:00 |
| → sdboyer-laptop joined | 17:00 |
|
mansour
| every while and then I get: # Changed but not updated: when I do git status. These files have been added already !! | 17:00 |
| → kinyobi joined | 17:00 |
|
doener
| Grum: did you replace both "HEAD"s? | 17:00 |
|
charon
| it won't work with a sha1 in place of the HEAD unfortunately | 17:01 |
|
| it also won't work if you have any other branch containing the same commit | 17:01 |
| melvinram|away → melvinram | 17:01 |
|
Grum
| i'm getting the error that i'm not inputting a 'symbolic ref' | 17:01 |
|
charon
| oh, right. just replace the entire $(git symbolic-ref HEAD) by the branch name in the second case | 17:02 |
|
doener
| easily fixable with $(git rev-parse --branches | grep -v ($git rev-parse HEAD)) | 17:02 |
| ← outoftime left | 17:02 |
|
doener
| s/($/$(/ | 17:02 |
| ← qrush_ left | 17:03 |
|
Grum
| k, i'll toy with this :) | 17:03 |
|
| thanks ^^ | 17:04 |
|
| i should start reading those manpages ;) | 17:04 |
| → kapone_ joined | 17:04 |
|
charon
| a way to spell --all-except that doesn't involve grep might be nice | 17:04 |
| → bryanl joined | 17:04 |
| ← kapone left | 17:05 |
| ← vmiklos left | 17:06 |
| → vmiklos joined | 17:06 |
|
charon
| (damn, another nice idea and we're supposed to be in -rc freeze) | 17:06 |
| ← cmarcelo left | 17:11 |
| → allan_wind joined | 17:12 |
|
allan_wind
| git show 18b6ecb0c | 17:18 |
|
| ... | 17:18 |
|
| index 2c62fb8..cab14f3 100644 | 17:18 |
|
| How do I find the commit hash for 2c62fb8? Or how do I find the parent for 18b6ecb0c for a particular file? | 17:18 |
|
offby1
| I have this dim idea that you can call "git ls-tree" on lots of trees, and grep the output for that | 17:21 |
| → _stack joined | 17:21 |
|
charon
| allan_wind: git rev-list -1 18b6ecb0c^ -- file | 17:22 |
|
MarcWeber
| allan_wind: 2c62... seems to be the start of a hash. You can use them instead of the full has has well. Just try git show 2c62fb8 | 17:22 |
|
charon
| allan_wind: that will give you the _first_ candidate. it may not be unique | 17:22 |
| → jchris joined | 17:23 |
|
_stack
| hi,is it possible to do auto replication of a certain repository throught varius servers with git? | 17:23 |
|
charon
| allan_wind: oh, and if 18b6ecb0c was a merge you'll have to investigate all of its parents. you could use 'git rev-list -2 18b6ecb0c -- file' then. | 17:24 |
| → softdrink joined | 17:24 |
| → plediii_ joined | 17:25 |
|
Daniel_B
| How do I find any tags that contain a given commit? (1.6.1.2) | 17:25 |
|
doener
| charon: commit^@ == all parents of commit | 17:26 |
|
charon
| doener: damn. thanks. i even took a brief look in rev-parse's manpage :) | 17:26 |
|
| doener: oh, and i sent out the gfb doc patch, but forgot to CC you. | 17:26 |
|
doener
| no problem, I'm subscribed anyway | 17:27 |
| → icwiener joined | 17:27 |
| → cgardner joined | 17:28 |
| ← exon left | 17:28 |
| → abditus joined | 17:29 |
|
allan_wind
| charon: git show 2c62fb8 does show me the blob, but I need the commit for use with bisect | 17:29 |
| ← HenryHuang left | 17:30 |
| → schierbeck joined | 17:31 |
|
charon
| allan_wind: that's why i'm suggesting rev-list. i didn't bring up show :) | 17:31 |
| ← reprore left | 17:31 |
| ← benn_d left | 17:31 |
|
charon
| allan_wind: taking doener's suggestion into account, you should use git rev-list -1 18b6ecb0c^@ -- file | 17:31 |
| → Spacecrack joined | 17:31 |
|
offby1
| what exactly does "git clone --mirror" do, and why would one use it? | 17:32 |
|
allan_wind
| charon: git rev-list -1 18b6ecb0c^ -- file gives me 0d41c924293bec930b9c226ab3744a10b7ef0d97 and when I show that it does not contain the before changes corresponding to my diff | 17:32 |
|
Spacecrack
| I wanna clone a complete part of a repository with a non-standard layout. There's not tags, and the branches are located in _two_ subdirectories. Can I use multi-globbing in the .git/config to import that? | 17:33 |
| → bobmcw joined | 17:33 |
| → d0k joined | 17:34 |
|
Spacecrack
| I.e., the directory structure looks like this: [common path]/production hosts the stable branches, [common path]/development the unstable ones, and [common path]/main/ is the trunk itself! | 17:34 |
|
charon
| allan_wind: is 18b6ecb0c a merge? | 17:34 |
| → patrikf joined | 17:35 |
|
Spacecrack
| For testing I only imported all production branches, but gitk strangely only showed one linear path of development. | 17:35 |
|
kadoban
| Spacecrack: gitk --all ? | 17:36 |
|
offby1
| curse kadoban and his fast fingers | 17:36 |
|
Spacecrack
| kadoban: thanks, that did it. Now I see funky arrows. :) | 17:37 |
| → chalky joined | 17:37 |
|
charon
| offby1: bc699afcce3c4 | 17:37 |
|
Gitbot
| [git bc699afcc]: http://tinyurl.com/clu5hn -- clone: Add an option to set up a mirror | 17:37 |
| ← yofel left | 17:37 |
|
Spacecrack
| BTW, what does it mean in gitk when there's a long arrow which is vertically interrupted? | 17:38 |
|
offby1
| hmm | 17:38 |
|
| charon: thanks ... | 17:38 |
|
abditus
| Git newbie question: I've cloned off a remote repository and created a branch I'm working on, and now I'd like to update that branch with the latest remote repository changes. Which command/options do I run? | 17:38 |
| → NSaibot joined | 17:38 |
|
offby1
| charon: that kinda begs the question, though: I don't know what "git remote --mirror" does. | 17:39 |
|
| Call me lazy, but I don't feel like deciphering the source to find out | 17:39 |
|
allan_wind
| charon: merge... I don't think so, how do I tell? | 17:39 |
|
offby1
| abditus: "git pull" should do it. | 17:39 |
|
charon
| offby1: unlike clone --mirror, remote --mirror is actually documented "in full" including semantics :) | 17:39 |
|
offby1
| hmm | 17:39 |
|
charon
| allan_wind: 'git show 18b6ecb0c' will show a line 'Merge: parent1 parent2 ...' | 17:40 |
| ← Niamor left | 17:40 |
| → Sitaramcell joined | 17:40 |
|
offby1
| I wouldn't call that "in full": it describes the behavior, but doesn't tell me why that behavior would be useful. What problem does "git remote --mirror" solve? | 17:40 |
| → Niamor joined | 17:40 |
|
lack
| offby1: It just puts the heads in refs/heads/ and not refs/remotes, so the repository is an exact mirror of the upstream repository. | 17:40 |
| → iulian joined | 17:41 |
|
offby1
| lack: I gathered that from the docs. But my question still stands: what problem does that solve? | 17:41 |
|
| Why would I want to do that? | 17:41 |
|
lack
| offby1: I use it to keep a local copy of the kernel.org man git tree on a local server, updated by nightly cron job, so we don't clog our thin pipe during the day. | 17:41 |
| ← plediii left | 17:41 |
|
abditus
| When I run "git pull" I get the message " Please name which branch you want to merge on..." It's a little unclear how I specify that. "git pull mybranchname" doesn't seem to work. | 17:41 |
|
allan_wind
| charon: yeah, I thought so. No it was not a merge | 17:41 |
|
charon
| offby1: if people then fetch from the mirror, they'll get the branches; fetch doesn't grab refs/remotes/* by default. | 17:42 |
| ← temoto-wd left | 17:42 |
|
offby1
| charon: so basically it's just for saving network bandwidth? | 17:42 |
|
charon
| huh? | 17:43 |
|
allan_wind
| charon: let me ask it more generic. I see a commit, how do i find out who made the defective check-in? git blame 18b6ecb0c^ -- file didn't work | 17:43 |
|
offby1
| charon: I'm trying to figure out what problem "git remote --mirror" solves. | 17:43 |
|
| "saving network bandwidth" is my guess at the problem; apparently, it's the wrong guess. | 17:43 |
|
charon
| it's to make a mirror of a repo that people can fetch from as if it was the original | 17:44 |
|
| one use could indeed be to save bandwidth. but maybe you just have cronjobs mirroring your repos around the world to back them up, who knows. | 17:44 |
|
offby1
| yes, yes; but that's not a _problem_. I still don't understand why people don't just fetch from the original. | 17:44 |
|
| ah | 17:44 |
|
| now we're talkin'. | 17:44 |
|
| thanks. | 17:44 |
| ← ciskje left | 17:45 |
|
offby1
| so a related question: I did git clone --mirror remote:foo.git mirror, and saw (among other things) "error: refs/stash does not point to a valid object!" | 17:46 |
|
charon
| allan_wind: and how exactly did it not work? that's the right syntax to blame a file in the parent. | 17:46 |
|
offby1
| what's that mean? What should I do about it? | 17:46 |
|
| The remote indeed has a stash, and my clone indeed doesn't have it. | 17:46 |
|
allan_wind
| charon: blame output does not contain the before change | 17:47 |
|
abditus
| N/M. Got it. git pull <remote branch name here> | 17:47 |
| ← dwave left | 17:47 |
|
charon
| allan_wind: that would be a bug, and you'd have to make a test case. | 17:47 |
|
| offby1: stashes are implemented through reflogs, and those aren't cloned. though i wonder why it would point at an invalid object; it should point to a merge commit of two other commits, all three of which make up the stash state. | 17:48 |
|
allan_wind
| charon: hmm... I think the problem is that 18b6ecb0c^ doesn't do it for the right file | 17:48 |
|
| bb | 17:48 |
| → thumper_laptop joined | 17:50 |
|
roger_padactor
| i set up git on my webserver. how do i change my username so i can ssh and clone that repo | 17:50 |
| ← thumper left | 17:50 |
|
roger_padactor
| currently its using my unix box username instead of me specifing one | 17:51 |
| → juanjoc joined | 17:52 |
| → joshdavey joined | 17:52 |
| → marvil07 joined | 17:53 |
| ← jordibunster left | 17:54 |
| → a-priori joined | 17:55 |
|
Ilari
| roger_padactor: user@host? | 17:59 |
| ← lorandi left | 18:03 |
| → lorandi joined | 18:03 |
| ← Hendu left | 18:06 |
| ← cedricv left | 18:06 |
| → cmarcelo joined | 18:08 |
| ← cmarcelo left | 18:09 |
| → cmarcelo joined | 18:09 |
| → name joined | 18:11 |
| ← marvil07 left | 18:14 |
| → dwave joined | 18:14 |
| ← kapone_ left | 18:15 |
| → countd joined | 18:15 |
| ← lorandi left | 18:16 |
| ← Sitaramcell left | 18:16 |
| → lorandi joined | 18:16 |
| → kapone joined | 18:17 |
| → RoPP joined | 18:18 |
| ← tango_ left | 18:19 |
| ← jmesnil left | 18:20 |
| → bobesponja joined | 18:22 |
| → jboyens joined | 18:24 |
|
Grum
| charon: git rev-parse $(git rev-list remotes/$BRANCH --not $(git for-each-ref refs/remotes/ --format='%(refname)' | grep -v remotes/$BRANCH) | tail -1)~ | 18:24 |
|
| that worked like charm for finding the point it branched of from | 18:24 |
|
| there is probably a more elegant way of doing it .. but hell =) | 18:25 |
|
| mm and for some reason it fails on some of the branches ... | 18:27 |
| → bronson joined | 18:27 |
| ← JensB left | 18:28 |
|
charon
| some of them will be reachable from another branch | 18:28 |
|
| so the rev-list will be empty | 18:29 |
| → tanek joined | 18:29 |
|
Grum
| yeah but that only happens when someone did something nasty in svk so it appears | 18:29 |
| → aziz joined | 18:29 |
| ← eletuchy_ left | 18:30 |
| → eletuchy joined | 18:30 |
|
Grum
| how does gitk list the branches a commit is in? | 18:30 |
| ← tanek left | 18:31 |
| ← akitada left | 18:31 |
|
charon
| git branch --merged $commit | 18:33 |
|
| (presumably) | 18:33 |
|
| er, 'git branch --contains $commit' of course. | 18:33 |
|
| charon goes to grab a coffee | 18:33 |
| ← lorandi left | 18:34 |
| ← nick_h[litage] left | 18:34 |
| → lorandi joined | 18:34 |
| → tanek joined | 18:36 |
|
TML
| Is there a flag to 'git format-patch' that can make it output them in a format that patch(1) can read, rather than the mbox-ish format? I looked on http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html, but if it's there, I'm not seeing it. | 18:36 |
|
doener
| patch usually reads that just fine | 18:36 |
| → FFighter joined | 18:37 |
|
FFighter
| hello | 18:37 |
| → dreiss joined | 18:37 |
|
doener
| unless your commit message looks like a diff | 18:37 |
|
FFighter
| is this the right place to ask about gitosis ? | 18:37 |
|
TML
| doener: Ah, maybe that's what I did. Thanks. | 18:38 |
| → ceej joined | 18:38 |
|
doener
| so far, nobody has been blamed for asking about gitosis in here | 18:38 |
| → da1l6 joined | 18:38 |
| → Sigma joined | 18:39 |
|
doener
| at least no as far as I'm aware | 18:39 |
|
FFighter
| hehe ok thanks | 18:39 |
|
TML
| doener: I can see how that was stupid of me. Thanks. | 18:39 |
|
FFighter
| how do I specify more than on repo per group? | 18:39 |
|
| like, can I do: writable = repo1,repo2,repo3 | 18:39 |
|
da1l6
| hi | 18:40 |
|
FFighter
| ? | 18:40 |
|
da1l6
| how do i get an accidently deleted file back from head state? | 18:40 |
|
krh
| da1l6: git checkout <file> | 18:40 |
|
doener
| FFighter: http://eagain.net/gitweb/?p=gitosis.git;a=blob;f=example.conf;h=87bd822fc17ebfe0132f7060afa8036f84c3be99;hb=master | 18:40 |
|
da1l6
| krh: thanks :) | 18:41 |
|
doener
| krh, da1l6: that's from the index, actually (so it won't work after "git rm") | 18:41 |
|
| to get the file from HEAD, it's "git checkout HEAD -- file" | 18:41 |
| → rigel joined | 18:41 |
|
rigel
| does git have support for hardware signing systems like the rsa dongle | 18:42 |
|
doener
| FFighter: see "writable" for group "quux" | 18:42 |
|
krh
| oh yeah | 18:42 |
|
FFighter
| doener, thank you | 18:42 |
|
| :) | 18:42 |
| ← mcella left | 18:44 |
| → merlin83 joined | 18:44 |
|
TML
| Maybe this doesn't make sense, but can I 'pull' a bare repo? That is, given a remote repo, I want to have a local 'bare' repo that matches it. | 18:47 |
|
doener
| TML: clone --mirror | 18:47 |
|
krh
| TML: git clone --bare, I think | 18:47 |
|
| oh | 18:47 |
|
doener
| TML: then you can _fetch_ in the bare mirror | 18:48 |
|
| TML: pull is fetch + merge, and merge doesn't work in a bare repo | 18:48 |
|
| (well, you can always fetch in a bare repo, not just when created with clone --mirror, but that sets it up as a mirror, obviously) | 18:49 |
| ← lorandi left | 18:49 |
|
TML
| doener: I actually want to have the remote repo 'push' to this bare repo in a post-commit hook. | 18:50 |
| ← _slacker_ left | 18:50 |
| ← ceyusa left | 18:50 |
|
doener
| TML: well, then just "git init --bare" does the trick, as usual... | 18:50 |
| → jeckel joined | 18:50 |
|
TML
| doener: And then setup the remote and push, rather than 'clone --mirror'? | 18:51 |
| → tango_ joined | 18:52 |
|
doener
| TML: yep. You might want to set remote.<name>.push to refs/*:refs/* as well (in the repo from which you push) | 18:52 |
| ← ToxicFrog left | 18:56 |
| → benn_d joined | 18:56 |
| → merlin1983 joined | 18:57 |
| ← kapone left | 18:58 |
| → solydzajs_ joined | 18:59 |
| ← plediii_ left | 19:00 |
| → warlock_mza joined | 19:00 |
|
TML
| doener: Sorry, that last bit was mostly nonsense to me. Got something I can read that would explain it? | 19:04 |
| ← eventualbuddha left | 19:05 |
|
doener
| the git-push man page | 19:05 |
| → eventualbuddha joined | 19:05 |
| → ice799 joined | 19:05 |
|
TML
| k | 19:05 |
|
| Transitioning to git is either going to make me brilliant or kill me :) | 19:06 |
|
doener
| TML: oh, actually, setting remote.<name>.mirror is smarter | 19:06 |
|
TML
| Is remote.<name>.mirror the same thing as "[remote "<name>"] mirror"? | 19:07 |
| → kapone joined | 19:07 |
|
doener
| yes. The former is what you give to "git config", the latter is how it looks in the config file | 19:07 |
|
TML
| ok | 19:08 |
| ← solydzajs_ left | 19:08 |
| ← solydzajs left | 19:10 |
| ← merlin83 left | 19:10 |
|
TML
| And that's a true/false? | 19:11 |
|
| "git config remote.hub.mirror true"? | 19:11 |
| ← msanchez left | 19:11 |
| ← eventualbuddha left | 19:11 |
|
doener
| yep | 19:13 |
|
| (see git-config(1)) | 19:13 |
| ← merlin1983 left | 19:13 |
| → merlin83 joined | 19:13 |
|
TML
| Ah - I honestly didn't even expect there to be a comprehsive list of all of them. | 19:15 |
|
doener
| some things aren't in there (the send-email stuff, for example), but most are | 19:17 |
| ← kinyobi left | 19:18 |
|
bentob0x
| can you add a remote in your 'global' ~/.gitconfig file instead of the local /.git/config file? | 19:19 |
|
kevlarman
| i think so | 19:19 |
|
| although that sounds a little silly | 19:19 |
| → ijcd joined | 19:19 |
|
kevlarman
| (if you clone an unrelated project you'll end up fetching a lot of unrelated stuff) | 19:20 |
| ← Spacecrack left | 19:20 |
|
bentob0x
| I just use a remote reference when I need it | 19:20 |
|
| like : git pull myremote master | 19:20 |
| → drizzd joined | 19:20 |
| → naeu joined | 19:21 |
| ← bobmcw left | 19:21 |
| ← Laibsch left | 19:22 |
| ← eletuchy left | 19:24 |
| ← noth left | 19:29 |
|
Grum
| how can i toss a commit away? (and yes i know i am altering history but that is ok) | 19:30 |
| ← chrisdone left | 19:30 |
| → maelcum|konv joined | 19:31 |
|
bremner
| git rebase --interactive | 19:32 |
| ← sgrimm left | 19:33 |
|
Grum
| but this only works nicely with commits relatively close to head i presume? | 19:33 |
| → lorandi joined | 19:33 |
| → PsychoTrahe joined | 19:35 |
| ← Yuuhi left | 19:36 |
| ← mncaudill left | 19:37 |
| → dmlloyd_ joined | 19:37 |
| → noth joined | 19:37 |
| ← dmlloyd left | 19:37 |
| dmlloyd_ → dmlloyd | 19:37 |
| qrush → qrush|away | 19:39 |
| ← csgeek left | 19:39 |
| → dsal joined | 19:39 |
| → fynn joined | 19:40 |
| → ryates joined | 19:42 |
| → AngryElf_ joined | 19:43 |
|
ryates
| I may be missing something obvious, but is there a way to clone an svn repository (aka git svn clone) to a bare repository that can then act as a shared git repo? so I need to rebase the git shared repo against svn occasionally and also push changes to the git repo from other git clients | 19:44 |
| ← AngryElf_ left | 19:44 |
|
Tv
| ryates: "rebase" and "shared" don't fit nicely in one sentence :( | 19:44 |
|
PerlJam
| ryates: you can make it a bare repo by hand editing things. | 19:45 |
|
allan_wind
| I have a commit `git show 18b6ecb0c7` and see index 2c62fb8..cab14f3 100644. I am interested in the commit for the blob 2c62fb8. git show 2c62fb8 does give me the right thing, but how do I find the corresponding commit? I tried `git blame 18b6ecb0c7^ but it does not give me the right content. git blame 2c62fb8 -- $file fails with "non commit ...". Any ideas? | 19:46 |
|
ryates
| Tv: that might explain it :) | 19:47 |
|
parasti
| allan_wind: blame takes a treeish and a filename, but you're passing it a blob SHA1 | 19:47 |
|
ryates
| my approach was to git svn clone to a temporary git repo, then set up my final repo by doing a clone --bare on my temp repo | 19:48 |
|
| but then I can't rebase! | 19:48 |
|
parasti
| allan_wind: "git blame 18b6ecb0c7^ -- $file" should do the right thing | 19:48 |
|
ryates
| PerlJam: you mean change the git config files to make it think it's bare? | 19:48 |
|
PerlJam
| ryates: yep (it's a one line change). but you'll also want to get rid of the working files. | 19:48 |
|
| and hoise the .git dir up to project.git | 19:49 |
|
ryates
| PerlJam: can you still rebase after doing that? | 19:49 |
|
PerlJam
| s/hoise/hoist/ | 19:49 |
|
| ryates: you *can*, but it's not generally a good thing. | 19:49 |
| → Hydrogen joined | 19:49 |
|
ryates
| thanks folks - perhaps I should abandon the effort. I was trying to "test out" git while still maintaining my working svn repo. Maybe I should just dive in with both feet. | 19:50 |
|
PerlJam
| But I guess with svn's linearity it's probably okay. I don't know. | 19:50 |
| → eventualbuddha joined | 19:50 |
|
ryates
| I'd rather deal with a learning curve with git than risk the integrity of my repo, me thinks | 19:50 |
| cbrake → cbrake_away | 19:50 |
|
PerlJam
| ryates: copy the svn repo and turn it into a git repo for play. | 19:51 |
|
allan_wind
| parasti: ahh... it does, I mixed up two files. Why doesn' git show 18b6ecb0c776f08556bf2fb0f6aef2bbd9d9b497^ $file give me the same thing? | 19:51 |
|
ryates
| PerlJam: I'll do that. Thanks again for the help. | 19:52 |
|
PerlJam
| ryates: it's really easy to go from git -> svn and not screw something up, but it's much harder to go the other way. | 19:52 |
|
| (I mean for working files) | 19:52 |
|
parasti
| allan_wind: "git show $rev $file" shows the differences in $file made in $rev | 19:52 |
|
PerlJam
| you do things in git-land that have no equivalent in svn-land so that just becomes a simple patch. | 19:52 |
|
ryates
| I'm really the only devloper at this time so this whole thing may be overkill - I was just going with a shared git repo to manage re-cloning between my work computer and my laptop | 19:52 |
|
allan_wind
| parasti: how content (blob) instead of diff? | 19:53 |
|
| how do I get... | 19:53 |
|
parasti
| allan_wind: "git show $rev:$file" | 19:53 |
| → drewr` joined | 19:55 |
| ← eventualbuddha left | 19:56 |
| ← lorandi left | 19:57 |
| → sgrimm joined | 19:58 |
| ← willb left | 19:59 |
| → engla joined | 20:01 |
| → elyezer joined | 20:01 |
| → plediii joined | 20:01 |
| → Toad__ joined | 20:01 |
| → yann joined | 20:02 |
| ← Hydrogen left | 20:06 |
| → lollan joined | 20:09 |
| ← drewr left | 20:11 |
| ← lollan left | 20:13 |
| ← Toad left | 20:13 |
|
allan_wind
| parasti: subtle... perfect, thanks a ton | 20:13 |
| ← da1l6 left | 20:13 |
| drewr` → drewr | 20:13 |
| Toad__ → Toad | 20:16 |
| → charon_ joined | 20:18 |
| ← charon_ left | 20:19 |
| → archis joined | 20:20 |
| ← tango_ left | 20:21 |
| → porcnick joined | 20:21 |
| ← archis left | 20:21 |
| ← porcnick left | 20:22 |
| → porcnick joined | 20:23 |
| → tango_ joined | 20:23 |
| ← unreal left | 20:25 |
| → unreal joined | 20:26 |
| ← dreiss left | 20:28 |
| ← topinupa left | 20:30 |
| → TheRealKerni joined | 20:31 |
| ← melvinram left | 20:32 |
| → pointlessjon joined | 20:35 |
| ← bentob0x left | 20:37 |
| ← error404notfoun1 left | 20:40 |
| → Hydrogen joined | 20:41 |
| edwardam → edwardam|Lnch | 20:43 |
| → dramsay joined | 20:44 |
| ← mfilipe left | 20:45 |
| ← warlock_mza left | 20:45 |
| ← bryanl left | 20:46 |
| → moccuo joined | 20:49 |
| → bobthecow joined | 20:49 |
| → qixyxexi joined | 20:50 |
| ← priidu left | 20:52 |
| → plediii_ joined | 20:52 |
| → melvinram joined | 20:52 |
| ← benn_d left | 20:53 |
|
bobthecow
| i'm having trouble with git-svn. It's set up, and working, but gets confused every time i pull from another repo. | 20:54 |
|
| I can't find much on debugging git svn. All my googling returns "how to set it up", not much on "how to fix it" | 20:54 |
| → charon_ joined | 20:54 |
|
bobthecow
| anyone have debugging tips and/or links for git svn? | 20:55 |
| ← d0k left | 20:56 |
| → error404notfound joined | 20:59 |
| ← radii left | 21:00 |
| ← plediii left | 21:03 |
| ← SRabbelier left | 21:03 |
| → SRabbelier1 joined | 21:04 |
| SRabbelier1 → SRabbelier | 21:04 |
| ← plediii_ left | 21:05 |
| ← charon left | 21:05 |
| charon_ → charon | 21:05 |
| → plediii joined | 21:05 |
|
parasti
| bobthecow: can you give us more info? "pull" isn't something you do in git-svn workflows, and "gets confused" and "another repo" doesn't say a lot about what's happening and what you're trying to do | 21:05 |
| → perezd88 joined | 21:06 |
|
bobthecow
| sorry. I'll try again :) | 21:06 |
| ← aisbaa left | 21:06 |
| ← qixyxexi left | 21:07 |
|
bobthecow
| i have three repos, call them: svn, A and B. | 21:07 |
|
| A was created using git-svn from the original svn repo. | 21:07 |
|
| B is a clone of A | 21:08 |
| → lywex joined | 21:08 |
|
bobthecow
| currently the code in A B and the original svn is identical. | 21:08 |
|
| making a change in B then pulling it to A works great. | 21:08 |
| → tvw joined | 21:09 |
|
bobthecow
| git-svn fetch and rebase in A works great. | 21:09 |
| ← jonnylamb left | 21:09 |
| → johnw joined | 21:09 |
|
bobthecow
| dcommit works great. | 21:09 |
|
| basically everything's great. | 21:09 |
|
drobbins
| hiya | 21:09 |
|
bobthecow
| but the next time i try to pull from B to A then dcommit, it wants to recommit all the previous changes too. | 21:10 |
|
| git-svn rebasing fixes it (with a few warnings about merges) | 21:10 |
|
drobbins
| hey, if I'm applying patches using git am -3, and a patch fails and it says it's unable to fall back to a 3-way merge, is there any steps that could have been taken (either in patch generation or otherwise) that *would* allow me to fall back on a merge? | 21:10 |
|
| s/is/are/ | 21:10 |
|
bobthecow
| but next time, it'll try all the same things plus any new commits. | 21:11 |
|
| it's getting absurd. | 21:11 |
|
| and i'm seeing more merge warnings. | 21:11 |
| → krawek_ joined | 21:11 |
| ← abditus left | 21:12 |
|
parasti
| bobthecow: merging + git-svn don't go well together | 21:12 |
| ← elmarco left | 21:12 |
| ← krawek left | 21:13 |
| ← dramsay left | 21:13 |
|
bobthecow
| parasti: that's not the answer i wanted to hear :) | 21:13 |
|
parasti
| bobthecow: hang on | 21:14 |
| → peritus joined | 21:14 |
| → abditus joined | 21:14 |
|
parasti
| bobthecow: git pull is fetch + merge, so I'd suggest you use git fetch + git merge --squash or git format-patch | git am | 21:15 |
| → marvil07 joined | 21:15 |
|
drobbins
| parasti: any suggestions for my question? | 21:16 |
| ← Niamor left | 21:16 |
| ← seb42 left | 21:18 |
| → offby1` joined | 21:18 |
| → seb42 joined | 21:19 |
| ← Tv left | 21:19 |
|
parasti
| drobbins: not really. all I know about git am merge support can be read in man git-am, the paragraph about -3 :) | 21:19 |
|
Gitbot
| drobbins: the git-am manpage can be found at http://git.or.cz/man/git-am | 21:20 |
| → Radtoo joined | 21:20 |
| → eletuchy joined | 21:20 |
|
drobbins
| parasti: ok, no problem :) | 21:20 |
|
ryates
| bobthecow: I just got a similar answer and decided to just convert to using git full time - you can too :) | 21:20 |
|
jaalto
| Is it possible to merge two git repositories? I have code in CVS. Long time ago I set up fresh git repository, moved all CVS head files there, started at ground zro and continued developing with git, forgetting about the CVS. No I would like to import the "old" code somehow. Is this possible? | 21:21 |
| ← error404notfound left | 21:21 |
| → |Voker57| joined | 21:22 |
| ← Voker57 left | 21:22 |
| ← ashleyw_ left | 21:24 |
| → thiago_home joined | 21:24 |
| ← lywex left | 21:25 |
|
parasti
| jaalto: sure. I don't know about Git's CVS support, but I've done this with old tarballs and a new SVN repo | 21:25 |
|
Radtoo
| How do I replace missing/corrupt objects in a local repository with objects from a remote repository? | 21:25 |
|
bobthecow
| ryates: unfortunately, I can't. I have to commit to an existing SVN repo, and I have no control over the decision to switch it to git :( | 21:26 |
| → bywe joined | 21:26 |
| → error404notfound joined | 21:26 |
|
charon
| bobthecow, parasti: actually merging works with git-svn as long as you make sure the svn history is the first-parent line | 21:27 |
| ← Hydrogen left | 21:27 |
|
jaalto
| parasti: How did you do it? I'm currently running 'git-cvsimport -p x -v -d <pserver-address> project' to convert my old CVS repo into git repo. But I don't know how would I merge this "old" with current devel repo. | 21:27 |
| ← orlandov left | 21:28 |
|
parasti
| jaalto: I fetched the "converted" repo into the Git repo and used grafts to glue the histories together | 21:29 |
|
| jaalto: to make the connection permanent, you'd probably want to use git filter-branch, too (which I never did) | 21:30 |
|
bobthecow
| parasti: Thanks, squashing seems to work. | 21:30 |
| ← hobodave left | 21:30 |
| → mriou_ joined | 21:31 |
|
jaalto
| parasti: What is grafts? | 21:31 |
| → benn_d joined | 21:31 |
|
bobthecow
| parasti: it's prob'ly better that way anyway. That way the SVN commits can be more concise :) | 21:31 |
|
parasti
| charon: I suspect the problem was that a particular "pull" didn't record a merge commit, so git-svn rewrote all the commits, Git lost track of what was already merged, and chaos ensued | 21:32 |
| → earcar joined | 21:32 |
|
parasti
| charon: probably wouldn't have happened with a --no-ff | 21:32 |
| ← nerochiaro left | 21:33 |
| ← offby1 left | 21:33 |
|
bobthecow
| parasti: is there any way to tell git-svn to start over? | 21:33 |
|
parasti
| jaalto: "grafts" is fake ancestry information, stored in .git/info/grafts | 21:33 |
|
charon
| oh this is about two git repos. then chaos will always ensue, as 'git svn rebase' rewrites the merge, but the other repo still has the old one | 21:33 |
|
bobthecow
| charon, parasti: so that will always happen unless changes from the second git repo are merged in as a unique commit, like with --squash ? | 21:34 |
|
parasti
| jaalto: not much info in the docs about it, but it's simple: one line per commit, "$commit $parent1 $parent2 ..." | 21:34 |
|
charon
| bobthecow: or take other steps to fix the rebasing. see the section "recovering from upstream rebase" in man git-rebase. the situation is pretty much the same, except that you can't really blame the upstream, as git-svn has no choice but to rebase | 21:35 |
|
Gitbot
| bobthecow: the git-rebase manpage can be found at http://git.or.cz/man/git-rebase | 21:35 |
|
bobthecow
| charon: thx :) | 21:35 |
| → Niamor joined | 21:36 |
| ← Weaselweb left | 21:37 |
| ← drizzd left | 21:39 |
|
jaalto
| parasti: Would you have any examples? | 21:39 |
|
| parasti: I'm not sure if I understand that "commit parent1 parent2" | 21:41 |
| → ashleyw joined | 21:42 |
|
parasti
| jaalto: each commit can have 0 or more parents, have a look at "git log --pretty=raw" output | 21:42 |
| → _Vi joined | 21:42 |
| → alexis__ joined | 21:42 |
|
parasti
| jaalto: so, for example, you'd see that $parent1 is a parent of $commit | 21:42 |
|
| jaalto: if you added a line in .git/info/grafts that said "$commit $parent2", that would override the actual parent info | 21:43 |
|
| jaalto: and the log output would reflect that | 21:43 |
| → dreiss joined | 21:43 |
| ← esparkman left | 21:44 |
| ← allan_wind left | 21:45 |
|
parasti
| jaalto: usually there's just one commit in a repo that has 0 parents, the root commit (first commit in the repo) | 21:45 |
| ← bywe left | 21:45 |
| ← melvinram left | 21:46 |
|
parasti
| jaalto: after fetching your converted-from-CVS repo, you'll have two root commits | 21:46 |
| ← ryates left | 21:46 |
| → mucuqi joined | 21:46 |
| → nick_h[litage] joined | 21:47 |
|
parasti
| jaalto: so you'll want to connect the first root commit which was already in the repo, to the appropriate commit from the fetched repo | 21:47 |
| → rovalent joined | 21:47 |
|
| jaalto listening parasti | 21:48 |
|
bobthecow
| I'm starting to think having a git repo stacked on top of an svn checkout would be a whole lot less hassle than git-svn :-/ | 21:48 |
| → skeeziks joined | 21:48 |
|
Radtoo
| bobthecow: uh... what? | 21:48 |
|
bobthecow
| Radtoo: just hating on the rebase right now. | 21:49 |
|
skeeziks
| How can I list *all* the branches in a remote git repository, not just the ones that I'm tracking? | 21:49 |
|
parasti
| jaalto: but do note that grafts are meant for temporary such "reparenting". as I said, you'll want to use git filter-branch to rewrite the commit objects and make the connection permanent | 21:50 |
|
jaalto
| parasti: I think I now understood the principle. So I have manually create the .git/info/grafts. It still has remove fetch for the "old". What's the next step to unify these two as single git repo? | 21:50 |
| → melvinram joined | 21:50 |
| → felipec joined | 21:50 |
|
jast
| skeeziks: all branches you've fetched? git branch -r | 21:50 |
|
Grum
| jaalto: filter-branch iirc; scary stuff =) | 21:50 |
|
jaalto
| parasti: You were faster. Okay, so I filter-branch everything to new location and that unifies all. | 21:50 |
|
parasti
| jaalto: first, check git log to see if the grafts work | 21:51 |
| ← Circuitsoft left | 21:51 |
|
Radtoo
| bobthecow: Rebase works fine and without bad caveats if there's only the central repository you commit against and you don't touch the part that's represented in SVN already. | 21:51 |
|
skeeziks
| jast: Sorry, perhaps tracking wasn't the right term. I'd like to get a list of the branches I haven't fetched - is that possible? | 21:51 |
|
jaalto
| parasti: clear. | 21:51 |
|
jast
| skeeziks: please see man git-ls-remote | 21:51 |
|
Gitbot
| skeeziks: the git-ls-remote manpage can be found at http://git.or.cz/man/git-ls-remote | 21:51 |
| ← ph^ left | 21:51 |
|
Radtoo
| bobthecow: That's not very hard to do though... so perhaps you're not using it right yet? | 21:52 |
|
qrush|away
| skeeziks: git remote show <remote> ? | 21:52 |
|
skeeziks
| jast: Aaaaaah! Thanks. I've been searching and haven't run across that yet. | 21:52 |
|
| qrush|away: No, that just shows what I'm tracking I think. | 21:52 |
|
jast
| git remote show is slightly friendlier and does the same thing | 21:53 |
| → Bombela joined | 21:53 |
| → AlexanderS joined | 21:53 |
|
qrush|away
| git ls-remote --heads origin | 21:53 |
|
parasti
| jaalto: oh, that's right, using git filter-branch on a published history is a really bad idea | 21:53 |
|
qrush|away
| that should do it for branches right? | 21:53 |
| ← berniyh left | 21:53 |
|
qrush|away
| this smells like a good tip :) | 21:53 |
|
jast
| git remote show calls ls-remote | 21:53 |
|
skeeziks
| jast: Perfect, thanks! | 21:54 |
|
bobthecow
| Radtoo: "don't touch the part thats represented in SVN already" ? | 21:54 |
|
parasti
| jaalto: I always forget about "minor details" like that because I'm mostly using git-svn :P | 21:54 |
| ← plediii left | 21:55 |
|
jaalto
| parasti: opps. I have already published the new devel repo. So I cannot merge it with old? | 21:55 |
|
qrush|away
| jast: is there a way to untrack a branch? | 21:55 |
|
jast
| depends on what you mean by tracking | 21:56 |
|
Radtoo
| bobthecow: Yes... basically your local branch that you will push against SVN and pull from has to be arranged nicely from revision 0 to svn trunk - and then your own commits on top of svn trunk. | 21:56 |
|
jast
| if you mean the thing branch --track sets up, just edit the config file | 21:56 |
|
alexis__
| remove the remote in your config file | 21:56 |
|
jast
| it'll have a [branch "foo"] section. remove it; done. | 21:57 |
|
Radtoo
| bobthecow: You never perform any actions against that branch that would mess up that order (rebase it against something else than SVN and all that...) and you'll not have much trouble. | 21:57 |
|
qrush|away
| Alright, so I'm definitely not tracking some branches yet they're showing in git remote show | 21:57 |
|
| so it really just checks ls-remote | 21:57 |
| ← markelikalderon left | 21:57 |
|
jast
| yes, as mentioned in the manual :) | 21:57 |
|
| manpage, actually | 21:58 |
|
bobthecow
| Radtoo: but i need to push changes from another git repo into SVN. | 21:58 |
|
qrush|away
| I just want to make sure what i'm going to write is accurate :) | 21:58 |
| → berniyh joined | 21:58 |
|
parasti
| jaalto: I think you can keep the graft around and it won't hurt, but filter-branch will overwrite all the commits, causing a lot of pain for anyone who's based any work on your published commits | 21:58 |
|
Radtoo
| bobthecow: one possible workflow is to NOT touch the svn branch at all, and work on another branch. Then right before you want to commit something on SVN, update the svn branch (rebase it) and merge the other branch on top of the svn branch. Then push. | 21:58 |
|
| bobthecow: (well, dcommit in svn's case) | 21:59 |
|
| bobthecow: You loose changes that happened "in between" with that of course, but there's not going to be any crazy conflicts that happened because of reordered commits in the other git repos | 22:00 |
|
bobthecow
| Radtoo: right. i don't care about "in between" that much. | 22:00 |
|
Radtoo
| bobthecow: Well, then the above workflow should work. probably. | 22:00 |
|
bobthecow
| Radtoo: and i have an svn branch that i'm not making any changes on. | 22:00 |
|
parasti
| jaalto: you can read more about problems with rewriting published history in man git-rebase (section "RECOVERING FROM UPSTREAM REBASE") | 22:00 |
|
Gitbot
| jaalto: the git-rebase manpage can be found at http://git.or.cz/man/git-rebase | 22:00 |
|
bobthecow
| Radtoo: the problem is that every time i merge the other branch into the svn branch, it tries to apply *all* previous changes to svn on the next dcommit. | 22:01 |
| → crowbar joined | 22:01 |
| ← crowbar left | 22:02 |
|
jaalto
| parasti: Would you suggest that it would be better to 1) git remote add URL old 2) fetch old 3) push that branch to server (for other to see) 4) document the use of grafs and live with it | 22:02 |
|
bobthecow
| Radtoo: if i do a merge with --squash seems to work fine. it's just when it does ff that it breaks. | 22:02 |
| → Tv joined | 22:03 |
| → msanchez joined | 22:04 |
|
Radtoo
| bobthecow: ... I don't exactly get that problem. You mean this happens when you merge on a svn branch that hasn't been rebased right before the merge, or always? | 22:04 |
| ← hagabaka left | 22:06 |
| ← elyezer left | 22:06 |
|
parasti
| jaalto: I'd go with keeping a separate repo project-old.git and grafts (I actually did something similar with the converted-from-tarballs repo, which is why I never used filter-branch either) | 22:07 |
|
jaalto
| prasti: okay, thanks for the insight | 22:07 |
| → hagabaka joined | 22:07 |
| ← cannonball left | 22:08 |
|
Radtoo
| bobthecow: Because what the svn-tracking branch really should have after the merge is one single additional commit on top of whatever is on the server. And you just like, commit that to the svn server. | 22:08 |
| ← a-priori left | 22:09 |
| → a-priori joined | 22:09 |
| → r0bby joined | 22:09 |
|
bobthecow
| Radtoo: that's what it does if i use --squash. but if i let it do an FF merge, it tries to commit everything since the initial svn checkout. | 22:09 |
| ← Ryback_ left | 22:10 |
| ← sporkmonger left | 22:11 |
|
bobthecow
| Radtoo: hmm. i just merged an identical working copy with my svn branch and it did a recursive merge instead of fast forward, and it looks like it created an empty changeset to push to SVN. | 22:11 |
| → ThaDon joined | 22:11 |
|
Radtoo
| bobthecow: seems all right? | 22:12 |
| ← dwave left | 22:12 |
|
bobthecow
| Radtoo: I thought so. then i did svn rebase and it tried to rewind head and replay a bunch of awesome all over the top of it. | 22:13 |
|
Radtoo
| bobthecow: but thats what it should do... | 22:14 |
| edwardam|Lnch → edwardam | 22:14 |
| → plediii joined | 22:14 |
|
Radtoo
| bobthecow: I think you merged somewhere in the middle instead of on top of HEAD or something. | 22:14 |
|
| bobthecow: Would make sense if you used --squash and thus didn't move the HEAD... | 22:16 |
| ← felipec left | 22:16 |
|
bobthecow
| Radtoo: right. is there a way to fix that? | 22:16 |
| → robinr joined | 22:16 |
| → kate21de joined | 22:17 |
|
Radtoo
| bobthecow: I'd fix it like this: Make sure you got the history and most recent commit in your other, non svn-tracking branch. Then hard-reset the svn branch by as many commits as it takes for it to rebase without interaction. | 22:17 |
|
| bobthecow: That way you'll be properly "mirroring" the svn repos again, without any altered history (or at least none that matters anymore). | 22:18 |
| ← plediii left | 22:18 |
| ← qrush|away left | 22:19 |
| → qrush joined | 22:19 |
| ← kate21de left | 22:19 |
|
Radtoo
| bobthecow: Perhaps it won't be unwise to use checkout on the branch just to make very sure it points to head after rebasing. (I can't remember if it always does). And then you can merge. :) | 22:20 |
|
charon
| where on earth does the libgit2 discussion hide out? shawn only seems to host the api docs, even the repo is gone from his site. google isn't very helpful, or i'm doing it wrong. there's no readme in the repo either. | 22:22 |
| ← LiamH left | 22:22 |
| → orlandov joined | 22:22 |
|
Radtoo
| bobthecow: The dcommit then really should be like, one revision committed, nothing else to report... (unless someone else committed something in the meantime but then the auto-merge / manual merge cycle just happens once or as many commits as are needed, not the insanity of possibly replaying half of the repository's history under the fun assumption that the revision in the middle was different) | 22:22 |
| ← cemerick left | 22:23 |
| → Hydrogen joined | 22:24 |
|
bobthecow
| Radtoo: okay. I've rebased it, it says my svn branch is up to date. I merged in my working branch (which is actually identical to the svn branch) and it created a recursive merge, which appears to be empty. | 22:25 |
|
| Radtoo: dcommitted that and got 'No changes between current HEAD and refs/remotes/git-svn' | 22:26 |
| → dmlloyd_ joined | 22:26 |
|
bobthecow
| Radtoo: that's a good thing, yeah? | 22:26 |
| ← jrmuizel left | 22:26 |
|
Radtoo
| bobthecow: Perfect. Now as long as you keep it in sync with svn prior to merging its gonna be easy. | 22:26 |
|
bobthecow
| Radtoo: so the process is... changes in working branch > head over to svn branch > svn rebase > merge in working branch > svn dcommit? | 22:27 |
| → plediii joined | 22:28 |
|
Grum
| is there an easy way to recognize a completely empty commit? (no permission/data/whatever changes at all?) | 22:28 |
|
thiago_home
| the tree is still the same | 22:29 |
|
| git commit refuses to commit like that, but you can create them with other tools | 22:29 |
|
Radtoo
| bobthecow: Well, I merge things on top of the SVN instead of the working branch but I think it matters not. :) | 22:29 |
|
Grum
| yeah git svn created them | 22:29 |
|
Radtoo
| bobthecow: Might actually be better as you say it... otherwise you could forget to get the changes from svn into your working branch | 22:29 |
|
bobthecow
| Radtoo: so what happens when svn changes, and i need to get things back? right. that's what i was asking. | 22:29 |
|
Grum
| so thiago_home: i should diff the git ls-tree $commit vs git ls-tree $commit^ ? | 22:30 |
|
Radtoo
| bobthecow: Yep. Its very likely better. :) | 22:30 |
|
maelcum|konv
| !time | 22:30 |
| → kate21de joined | 22:30 |
| → eddyp joined | 22:30 |
| → antirobotrobot joined | 22:32 |
| ← joshdavey left | 22:32 |
|
antirobotrobot
| how can i have git-archive include submodules? | 22:32 |
|
Radtoo
| bobthecow: Well, I think you got both what happened and why it happened, right? :) | 22:32 |
|
bobthecow
| Radtoo: i sure hope so. If I didn't, I | 22:33 |
|
| 'll be back :) | 22:33 |
|
charon
| Grum: there's diff-tree that does that for you | 22:33 |
|
Grum
| ok; so if that output is nothing i can safely assume the commit is completely not needed? | 22:34 |
|
Radtoo
| bobthecow: Sure. Glad to have helped, have fun with git. | 22:34 |
| ← Bombela left | 22:34 |
|
Grum
| i'm trying to find out if i can safely purge a branch (for some reason i got a bunch of them without any changes) | 22:34 |
| → lolage joined | 22:34 |
|
bobthecow
| Radtoo: Thanks for all the help. | 22:35 |
|
| Radtoo: now how do I keep it from making SVN commit messages like 'Merge commit 'origin/master'' ? | 22:37 |
|
charon
| Grum: yes | 22:38 |
|
Grum
| charon: thanks; also what is the best way to rename a branch without leaving a trace of me doing so? | 22:38 |
|
charon
| Grum: though you may not want to drop a merge even if it is the same as all its parents :) | 22:38 |
|
Grum
| moving it in .git/refs ? | 22:38 |
|
Radtoo
| bobthecow: well, you can specify a message when merging (-m or something, or perahaps you can leave it uncommited and just specify a commit message) OR use git rebase --interactive HEAD~1 to rewrite the last commit :P | 22:38 |
|
Grum
| charon: its mostly for branches that are just useless | 22:38 |
|
| the svn import created a bunch of them and they are just empty commits | 22:39 |
|
Radtoo
| bobthecow: Oh and of course git commit --amend... | 22:39 |
|
Grum
| so i'm going to loop over all branches; see where they came from and then check if there is just 1 commit and if that one commit contains no data .. *purge* | 22:39 |
|
| i only get one chance to clean it up properly .. at the migration itself ;) | 22:40 |
|
charon
| Grum: why would you want to move them with no trace? ... i think you'll have to trash the reflog as the old entries are bound to contain some hints of the old name | 22:40 |
| ← dmlloyd left | 22:41 |
|
Grum
| mmm | 22:41 |
| dmlloyd_ → dmlloyd | 22:41 |
| ← RaySl left | 22:42 |
|
Grum
| hmm so i should just rename them using git branch? (i was planning to move all the refs/remote/xxx) | 22:42 |
| ← msanchez left | 22:43 |
| ← kapone left | 22:43 |
|
Grum
| they should be renamed to refs/heads/xxx right? (in order to appear as 'normally created branches) | 22:43 |
|
charon
| if you're not afraid of trashing any existing refs/heads/*, saying 'git fetch . refs/remotes/*:refs/heads/*' will do that in one go | 22:44 |
|
| well, not rename but copy. | 22:44 |
|
Grum
| ok but then i still need to git branch -D -r for every remote/x right? | 22:45 |
| ← drewr left | 22:45 |
| ← faithfulgeek left | 22:45 |
|
Grum
| mmm i have to loop over them individually to inspect them (to see if they arent empty and thus worthy of saving) so i might as well just rename them | 22:46 |
|
charon
| i'm not even sure it lets you rename across hierarchies. but in any case you'll have to delete them individually unless you resort to 'rm .git/refs/remotes/*' | 22:47 |
|
| (and similarly for the logs) | 22:47 |
|
Grum
| lets try ^^ | 22:48 |
| → johan-s joined | 22:48 |
| → orlandov_ joined | 22:49 |
|
Grum
| error: refname refs/heads/remotes/$BRANCH not found ... hmmm | 22:49 |
| ← ashleyw left | 22:50 |
| ← nick_h[litage] left | 22:54 |
| → bdimcheff joined | 22:54 |
| ← a-priori left | 22:54 |
| ← cnu left | 22:55 |
|
Grum
| oi that wasn't planned; it seems there are packed-refs as well | 22:55 |
| ← dmlloyd left | 22:56 |
|
charon
| man git-update-ref | 22:57 |
|
Gitbot
| charon: the git-update-ref manpage can be found at http://git.or.cz/man/git-update-ref | 22:57 |
|
charon
| note that the first argument must be the full ref name, usually starting with refs/ | 22:57 |
|
Grum
| that works for both packed and unpacked refs i presume? | 22:58 |
|
charon
| yes | 22:58 |
|
Grum
| and for the logs? | 22:58 |
|
SRabbelier
| Is there a way to list all files that were modified since a certain time? | 22:59 |
| → sporkmonger joined | 22:59 |
|
charon
| Grum: deleting also deletes the reflog | 22:59 |
| → SLiMIT joined | 23:00 |
|
charon
| SRabbelier: maybe git diff --name-only $(git rev-list --first-parent --before=yesterday -1 HEAD) HEAD | 23:01 |
| ← boto left | 23:01 |
| ← krh left | 23:01 |
| ← Modius left | 23:01 |
|
charon
| though "since <time>" generally isn't very well defined | 23:02 |
| ← maelcum|konv left | 23:02 |
| → dmlloyd joined | 23:02 |
|
SRabbelier
| charon: awesome, that seems to work :) | 23:02 |
| → Modius joined | 23:02 |
| ← cmarcelo left | 23:04 |
| ← moore_ left | 23:04 |
| → moore_ joined | 23:05 |
| ← peritus left | 23:06 |
| ← Sigma left | 23:07 |
| ← Arrowmaster left | 23:07 |
| ← NSaibot left | 23:07 |
| → Arrowmaster joined | 23:08 |
|
SRabbelier
| charon: mhhh, now how do I list only the files that were created since a certain date? :d | 23:08 |
|
charon
| --diff-filter=A | 23:09 |
| ← perezd88 left | 23:11 |
| ← naeu left | 23:11 |
| ← orlandov_ left | 23:12 |
|
SRabbelier
| charon: you are made of win :) | 23:13 |
| → krh joined | 23:13 |
|
Grum
| charon: for ref in $(git for-each-ref refs/remotes --format='%(refname)'); do git update-ref $(echo $ref|sed 's#remotes#heads#') $(git rev-parse $ref); done | 23:13 |
|
| that seems to so what i meant; now to just clean up the old refs | 23:13 |
| → ToxicFrog joined | 23:17 |
| ← orlandov left | 23:17 |
| ← Hydrogen left | 23:18 |
| → Hydrogen joined | 23:19 |
| ← Hydrogen left | 23:20 |
| ← antirobotrobot left | 23:20 |
|
Grum
| and it seems i can only do that with rm -rf .git/refs/remotes .git/logs/refs/remotes -- oh well .. starting to look nice now ;) | 23:22 |
| ← schierbeck left | 23:22 |
| → a-priori joined | 23:23 |
|
alexis__
| hi guy, I'd like to know how to do a "push --mirror" from a non-bare repo to another without having to create a local refs per remote branches? | 23:23 |
| ← pointlessjon left | 23:24 |
| ← ProperNoun left | 23:24 |
| ← PuffTheMagic left | 23:26 |
| → PuffTheMagic joined | 23:26 |
| ← loincloth left | 23:27 |
| → loincloth joined | 23:28 |
| → ashleyw joined | 23:30 |
| ← barjunk left | 23:32 |
| ← a-priori left | 23:32 |
| ← earcar left | 23:33 |
| ← bobthecow left | 23:34 |
| → cnk joined | 23:34 |
| ← cnk left | 23:34 |
| → ProperNoun joined | 23:34 |
|
charon
| Grum: well, update-ref can also delete | 23:34 |
| → orlandov joined | 23:35 |
|
Grum
| mmm how? | 23:38 |
| → ciskje joined | 23:39 |
| ← kate21de left | 23:39 |
| ← edwardam left | 23:39 |
| → kate21de joined | 23:39 |
| ← kate21de left | 23:43 |
| ← sporkmonger left | 23:43 |
| ← nothinghappens left | 23:43 |
|
charon
| Grum: update-ref -d refs/foo | 23:44 |
| ← dsal left | 23:44 |
| ← welly left | 23:45 |
| → davik joined | 23:46 |
| ← TheRealKerni left | 23:46 |
| ← charon left | 23:47 |
| ← loincloth left | 23:47 |
| → welly joined | 23:47 |
| ← patrikf left | 23:48 |
| ← jboyens left | 23:49 |
| ← orlandov left | 23:49 |
| ← rovalent left | 23:50 |
| ← krh left | 23:51 |
| dwmw2 → dwmw2_gone | 23:54 |
| ← levifig left | 23:54 |
| → moore__ joined | 23:55 |
| ← EmilMedve left | 23:56 |
| ← moore_ left | 23:56 |
| ← chris2 left | 23:58 |