| 2006-04-30 |
| → dbindner_ joined | 00:10 |
| → coywolf joined | 00:20 |
|
floppyears
| thanks loops | 00:50 |
| ← shevegen left | 00:51 |
| → benlau joined | 01:48 |
| → morans joined | 01:49 |
| → Chocobo joined | 02:14 |
|
Chocobo
| I smell like lighter fluid. | 02:28 |
| → DrNick joined | 02:56 |
|
floppyears
| git is so nice and fast :) | 03:44 |
|
emrys
| ok I'm confused. | 03:50 |
|
| I did a git-pull in a repository I've made no local changes to, and it failed to merge and tells me I need to fix it by hand. | 03:50 |
|
| is that a normal kind of occurance? if I haven't changed anything, and upstream is already clean enough for me to pull, what would fail to merge? | 03:51 |
|
| ok there are actual conflicts here but I'm really confused where they came from, hrm... | 03:57 |
|
| ok. when I did git pull, to an sftp server, it wanted my password twice. the first one time it appeared to pull down the latest versions of all the branches. the second time it did some kind of local merge, and it looks like it tried to merge changes from the upstream master branch into the devel branch I had the local checkout on, even though that's not the origin branch for it. that's why there are conflicts. | 03:59 |
|
| I'm not sure why it tried to merge across branches, unless there's some default of merging a changed branch to whichever is checked out, but that seems rather broken, so I've probably got something screwed up...this make sense to anyone? | 04:00 |
|
| yes the docs say git-pull merges the retrieved heads into the current branch. ugh, not what you want to use for typical updates of upstream branches then. | 04:02 |
|
| so I should use git-fetch for that? | 04:03 |
|
nickh
| pull = fetch+merge into current branch | 04:07 |
|
emrys
| or is some form of merge required to get any of the changes into my checked out working copy? | 04:07 |
|
nickh
| if you just want to keep local branches up to date with remote, fetch is what you want | 04:08 |
|
emrys
| so I have upstream branches a, b, c. all 3 have changed. I have b checked out. I do git-fetch, and that will update my objects for a, b, and c. will it update my checked out b working copy to the current upstream b, or do I need to do something else to get that? | 04:12 |
|
| like a reset or something | 04:13 |
|
nickh
| you'll want to git pull to merge the new remote stuff into your checked-out branch | 04:13 |
|
emrys
| well the problem is 'git-pull' appears to try to merge the changes in a and b and c all together into my checked out b | 04:14 |
|
nickh
| eg. with git, remote master fetches to origin, i do "git pull . origin" | 04:14 |
|
emrys
| ok so I need to specifiy branches when I git pull | 04:14 |
|
| so if I had b checked out I could git fetch and then git pull . b | 04:15 |
|
nickh
| something like that, i'm used to the remote and local having different branch names for that case | 04:17 |
|
emrys
| they have the same names | 04:17 |
|
| I think the problem is just that 'git pull' without args is basically 'git fetch *' (fine) and then 'git merge *' (not so fine) | 04:17 |
|
nickh
| right, to get remote updates, you generally want to fetch instead of pull | 04:18 |
|
dbindner_
| Ok, I'm just following along. He should do 'git fetch origin'? What exactly should he do when he is ready to merge (i.e. update the working tree)? | 04:21 |
|
nickh
| the way i generally do work on git is 'git checkout master; git checkout -b topic-branch; #work/work/work; git fetch origin; git pull . origin' | 04:23 |
|
dbindner_
| I see. So the pristine origin branch is updated with the fetch and then you merge from there. I get it. | 04:24 |
|
| I think I was confused because in one case origin essentially means a server, and in the other it is a branch. | 04:25 |
|
nickh
| right, the arg to fetch references $GIT_DIR/remotes/origin and the arg to pull references a branch | 04:27 |
|
floppyears
| hi | 04:37 |
|
| I did "git add ." | 04:40 |
|
| is that the correct way of adding files to the git repo | 04:40 |
|
| or should I have used git-update-index ? | 04:41 |
|
nickh
| git add works fine, it's a wrapper to git-update-index --add | 04:43 |
|
floppyears
| oh, ok | 04:43 |
|
| thanks :) | 04:43 |
|
| nickh: what's the difference between git commit and git commit-tree ? | 04:46 |
|
emrys
| yeah it makes sense to me now. thanks. | 04:51 |
|
| glad it's something that actually makes complete sense, that was a bit of a frightening message to get :-/ | 04:52 |
|
nickh
| 'git commit' is probably what you want - it takes care of hooks etc. and runs commit-tree | 04:53 |
| ← dormando left | 05:17 |
| → spuk joined | 05:37 |
| → dormando joined | 06:10 |
| → lachyg joined | 06:56 |
|
lachyg
| Hi, quick question...is there a way in which I can check out an arbitary revision from a git repository without losing the later commits? | 07:24 |
|
loops
| lachyg, yes for sure | 07:25 |
|
| lachyg, in git when you want to checkout an arbitrary commit point, you create a branch. | 07:26 |
|
| so.. git branch tempname <arbitrary rev> ; git checkout tempname | 07:27 |
|
| or.. you can combine that into a single command: git checkout -b tempname <arbitrary rev> | 07:27 |
|
lachyg
| loops: thankyou | 07:53 |
| → gitster joined | 08:40 |
| → chris2 joined | 09:03 |
|
wildfire
| when doing a cg-merge, is there any way to say 'only merge upto a particular commitd' or is it always to the latest of a branch? | 09:30 |
|
normalperson
| wildfire: i don't use cg-merge, but you can probably just specify the commitid instead of the head, or create a temp branch from that commitid | 09:38 |
| → ferdy joined | 10:11 |
|
wildfire
| normalperson, ah yes - the branching idea worked nicely; thanks | 10:12 |
| → robfitz joined | 10:46 |
| → robinr joined | 10:55 |
| → goloo joined | 10:57 |
| → benlau joined | 11:05 |
| → kampasky_ joined | 11:52 |
| → ferdy joined | 12:36 |
| → robfitz joined | 13:18 |
| → benlau joined | 13:37 |
| → schofield joined | 14:11 |
| → Beber` joined | 14:17 |
| → benlau joined | 14:22 |
| → benlau joined | 14:59 |
| → alp joined | 16:30 |
| → robinr joined | 16:40 |
| → Tv joined | 16:42 |
| → Oeje1 joined | 16:46 |
| → spuk joined | 16:55 |
| → juvenis- joined | 16:59 |
| → lynxlynxlynx joined | 17:29 |
| → sharyari1 joined | 18:08 |
|
sharyari1
| elo | 18:09 |
|
| bye :P (forgot to RTFM before I entered) | 18:11 |
| ← sharyari1 left | 18:11 |
| → stauki joined | 18:13 |
| → DrNick joined | 18:46 |
| → bjk joined | 19:06 |
|
bjk
| how can i cherry pick more than one commit? git-rev-list outputs in the wrong order to do a loop | 19:08 |
|
| nm. git-rebase. irc logs are good. | 19:13 |
|
ShadeHawk
| What's "git potty"? | 19:23 |
| → bjk joined | 19:41 |
| ← Oeje1 left | 20:16 |
| Beber` → rebeb | 20:17 |
|
matled
| is it possible to get new refs other than tags from a remote repository after the initial clone? | 20:26 |
|
loops
| Not sure what you mean matled, are you talking about fetching a branch from the remote repo that was created there after you cloned that repo ? | 20:30 |
|
matled
| yeah, fetching and getting an initial ref | 20:31 |
|
| so like 'give me all new branches' | 20:31 |
|
loops
| Don't think there's anything like that. I believe you have to set up any new branches yourself. | 20:34 |
|
| You can at least see if there are new branches, say on the origin remote like this: git ls-remote -h origin | 20:35 |
|
| where <origin> is any remote repo you've defined.. or a full URL to one.. | 20:35 |
|
matled
| thanks, that seems to be what I'm looking for | 20:37 |
|
| is there any obvious reason there is no such feature in the default scripts? | 20:37 |
|
loops
| I can't think of one.. | 20:41 |
|
| git-fetch origin $(git ls-remote -h origin | sed 's/.*\t\(.*\)/\1:\1/') | 20:41 |
|
ShadeHawk
| Check if 'git pull -all' doesn't give what you want. | 20:42 |
|
loops
| I don't see a "-all" in the docs | 20:42 |
|
matled
| and git-fetch does only git ls-remote --tags, not --heads | 20:43 |
|
loops
| anyway, that fetch line above will grab all the new branches in the origin.. (and update the existing ones) | 20:43 |
|
| could turn that into a script easily if git doesn't already have the feature buried in it somewhere | 20:44 |
|
ShadeHawk
| Or add --heads or --all to 'git pull' (IIRC it is present in 'git push') | 20:52 |
|
matled
| deleting branches on remote repositories is not possible, is it? without using special hook scripts to do the job :) | 21:03 |
|
loops
| Someone else was asking about the same thing recently.. Git's really designed around the owner having ssh access to all repos. | 21:06 |
|
| Could imagine a script that would check all heads and delete any it found to reference a sha1 of 0{40} | 21:07 |
|
| So you could just force an all zero ref to any ref you wanted to delete | 21:07 |
|
matled
| i think this can easily be done with a hook script, i just wasn't sure if there was anything for that built-in | 21:08 |
|
loops
| but if you have ssh, it's pretty easy to just ssh rm the thing ;o) | 21:08 |
|
matled
| % git push --force origin 0000000000000000000000000000000000000000:test | 21:09 |
|
| error: cannot happen anymore | 21:09 |
|
| at least pushing 0{40} does not seem to work.. | 21:09 |
|
loops
| pick any number :o)... it's a crufty idea anyway.. has to be a better way | 21:10 |
| → chris2 joined | 21:24 |
| → robfitz joined | 21:33 |
| ← floppyears left | 22:19 |
| → jamien joined | 23:15 |