IRCloggy #git 2006-04-30

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2006-04-30

dbindner_ joined00:10
coywolf joined00:20
floppyears thanks loops00:50
shevegen left00:51
benlau joined01:48
morans joined01:49
Chocobo joined02:14
Chocobo I smell like lighter fluid.02:28
DrNick joined02: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 branch04: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 want04: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 something04:13
nickh you'll want to git pull to merge the new remote stuff into your checked-out branch04: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 b04: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 pull04:14
so if I had b checked out I could git fetch and then git pull . b04:15
nickh something like that, i'm used to the remote and local having different branch names for that case04:17
emrys they have the same names04: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 pull04: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 branch04:27
floppyears hi04:37
I did "git add ."04:40
is that the correct way of adding files to the git repo04:40
or should I have used git-update-index ?04:41
nickh git add works fine, it's a wrapper to git-update-index --add04:43
floppyears oh, ok04: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-tree04:53
dormando left05:17
spuk joined05:37
dormando joined06:10
lachyg joined06: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 sure07: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 tempname07:27
or.. you can combine that into a single command: git checkout -b tempname <arbitrary rev>07:27
lachyg loops: thankyou07:53
gitster joined08:40
chris2 joined09: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 commitid09:38
ferdy joined10:11
wildfire normalperson, ah yes - the branching idea worked nicely; thanks10:12
robfitz joined10:46
robinr joined10:55
goloo joined10:57
benlau joined11:05
kampasky_ joined11:52
ferdy joined12:36
robfitz joined13:18
benlau joined13:37
schofield joined14:11
Beber` joined14:17
benlau joined14:22
benlau joined14:59
alp joined16:30
robinr joined16:40
Tv joined16:42
Oeje1 joined16:46
spuk joined16:55
juvenis- joined16:59
lynxlynxlynx joined17:29
sharyari1 joined18:08
sharyari1 elo18:09
bye :P (forgot to RTFM before I entered)18:11
sharyari1 left18:11
stauki joined18:13
DrNick joined18:46
bjk joined19:06
bjk how can i cherry pick more than one commit? git-rev-list outputs in the wrong order to do a loop19:08
nm. git-rebase. irc logs are good.19:13
ShadeHawk What's "git potty"?19:23
bjk joined19:41
Oeje1 left20:16
Beber`rebeb20: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 ref20: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 origin20: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 for20: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 docs20:42
matled and git-fetch does only git ls-remote --tags, not --heads20: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 somewhere20: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 delete21: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-in21: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:test21:09
error: cannot happen anymore21: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 way21:10
chris2 joined21:24
robfitz joined21:33
floppyears left22:19
jamien joined23:15

Logs Search ←Prev date Next date→ Channels Documentation