IRCloggy #git 2008-12-16

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.

2008-12-16

__ash__ left00:03
jackdempsey joined00:08
kevlarman can someone help me figure out why git-filter-branch --env-filter won't change the author?00:09
volante anyone used any perl libraries for git?00:10
johnw i think you need to use commit-filter for that, don't you?00:10
parasti kevlarman: what's your script00:10
kevlarman essentially [ "$GIT_COMMIT_AUTHOR" = "A" ] && GIT_COMMIT_AUTHOR="B"; export GIT_COMMIT_AUTHOR00:11
parasti GIT_COMMIT_AUTHOR doesn't sound like a valid env var, see man git-commit-tree00:12
Gitbot parasti: the git-commit-tree manpage can be found at http://git.or.cz/man/git-commit-tree00:12
scientes left00:13
kevlarman yeah i'm mixing my variables up00:13
i meant GIT_AUTHOR_NAME00:13
schlurchz kevlarman: might be helpful to paste your command line00:14
not here of course00:14
joydivider left00:14
Pieter git00:15
parasti that's what everyone's thinking, isn't it.00:15
Pieter I don't know what they're thinking00:16
k0001 left00:17
kevlarman http://pastebin.com/de3e7fe300:17
Thralas left00:17
sping left00:18
DrNick you want something like git-filter-branch --env-filter "source $(pwd)/fixcommitter.sh" 1d4936d88f232c642b45fb913f2ac5c7bf0b9ad7..HEAD00:19
assuming that works00:19
kevlarman DrNick: it worked00:22
(why did it work?)00:23
DrNick filter-branch takes script fragments on the command line00:23
joydivider joined00:27
loincloth joined00:27
Ilari kevlarman: The reason original didn't work is that the script ran in subprocess of filter-branch, so it couldn't change environment variables in filter-branch process. In contrast, with source, it ran in the same process and thus could alter environment variables.00:27
joydivider left00:27
schlurchz Ilari: the `hidden' subshell trap strikes again00:28
ceej left00:29
zerok left00:29
branstrom left00:30
Ilari Hmm... Does the shell invoke subshell to execute the script or does the shell execute the file? :->00:35
deskinm left00:36
schlurchz Ilari: well I guess it just executes the file, but it is a shell script, so it invokes a subshell :-)00:37
Ilari: but you're right, it was not the usual subshell trap.00:38
Tv if you tell a shell to run a command, it will check if it's an internal command (like "cd").. if not, it'll fork+exec it00:39
anything forked can't change parent process environment00:39
Bass10 left00:39
deskinm joined00:39
Ilari At least bash can run stuff that clearly can't be execed (lacks shellbang; they run as bash shell scripts).00:40
bugfux joined00:41
Tv Ilari: that's not a bash specialty, i think00:41
therrg joined00:41
Tv Ilari: you know, original unix didn't have shebang..00:42
bugfux I have to define custom paths to get the git commands working on my server and then when I try to go git clone from a remote computer it is saying "git-upload-pack command not recognized"00:42
anyone know how to get git to recognize my .bash_profile file and load it00:42
or how can I tell git to know where the binaries are00:43
Ilari Trying to strace such things blows up real quick (ENOEXEC). Whereas stracing shellbang scripts works.00:43
mugwump_ bugfux: did you go through the FAQ answer for that?00:43
PloenK left00:43
bugfux nah I didnt know there was one, lemme check now00:43
Ilari bugfux: .bash_profile is not loaded on noninteractive login. You need to set up paths in .bashrc.00:44
bugfux ohhh bashrc cool thanks00:44
Tv Ilari: hmm yeah it seems it's special cased these days00:45
bugfux that worked, thanks guys00:45
Tv Ilari: but the special case handling is just fork+execing /bin/sh with the filename as arg00:46
bdiego joined00:46
perezd88 left00:46
warthog19 joined00:47
scrooloose_ left00:48
warthog9 left00:50
bryanl joined00:50
moccuo left00:56
chris2 left00:56
bobmcw joined00:59
scrooloose_ joined01:01
joevandyk left01:01
mbroeker left01:03
ebzzry left01:04
ebzzry joined01:05
drewr left01:07
x_or joined01:09
johnw left01:13
ashleyw joined01:18
Marmouset joined01:18
bobmcw_ joined01:20
pjhyett joined01:20
therrg left01:20
branstrom joined01:22
cgardner left01:22
ivanz joined01:23
stevenjenkins joined01:24
david_koontz left01:26
moccuo joined01:27
k0001 joined01:29
h0nk joined01:31
faithfulgeek left01:32
advany joined01:33
loincloth left01:35
bobmcw left01:36
dragos-stoenica left01:37
madewokherd joined01:39
CodeOfficer left01:42
k0001 left01:43
stevenjenkins left01:43
ben_h joined01:44
k0001 joined01:47
schlurchz left01:48
cnk joined01:48
pcapriotti_ left01:49
marvil07 joined01:49
bbuss left01:49
CodeOfficer joined01:55
carllerche left01:55
bjeanes joined01:59
zwu|gonezwu02:00
bugfux left02:00
danopia_ joined02:02
h0nk left02:02
faithfulgeek joined02:04
gretch joined02:06
parasti left02:08
RayMorgan left02:09
bosie left02:10
ajonat joined02:15
loincloth joined02:16
danopia_danopia02:17
loincloth left02:19
kbiddlecomb joined02:23
alikins left02:23
clamothe joined02:23
clamothe I'm using git-svn. A branch I am working on got renamed.02:24
How can I point my local branch at the renamed branch, without losing any merge history?02:24
bobmcw_ left02:25
aziz left02:29
__Zimm left02:29
kbiddlecomb sorry about the noob-like question, but I made some changes to my fork of a project. I tried to merge with upstream today, and got a conflict with one of the files..., i tried to do a "git stash", but got the error "fatal: git-write-tree: error building trees; the index is unmerged?"... what does this mean?02:29
Flathead joined02:31
nothingHappens_ joined02:31
Ori_B joined02:32
kbiddlecomb clamothe: can't you just move your local branch?02:32
Ori_B hi02:32
I'm having a problem with git rebase02:33
it tells me that it can't detach head02:33
webmat joined02:35
johnw joined02:37
snitko joined02:37
PloenK joined02:41
nofxx left02:41
alikins joined02:41
Ori_B ah, figured it out. had an untracked file in my working directory that was named the same as a file I had in the repository02:41
moccuo left02:42
flaguy left02:42
Ori_B ah, nice. and new versions of git have the same change I put into the rebase script to get it to tell me that02:43
Ori_B left02:43
jesselucas joined02:44
scrooloose_scrooloose02:45
ahupp|fb left02:45
zjason_ joined02:47
advany left02:47
ahupp|fb joined02:48
danopia_ joined02:52
danopia left02:52
foutrelis left02:53
RayMorgan joined02:54
nofxx joined02:56
kbiddlecomb can someone help me do a merge with my modified fork, and upstream?02:56
snitko left02:57
bryanl left02:57
kbiddlecomb i get "! [rejected] funtoo.org -> kbiddlecomb (non fast forward)"02:57
jast kbiddlecomb, please see faq non-ff02:58
Gitbot kbiddlecomb: Your push would lose changes on the remote. See http://git.or.cz/gitwiki/GitFaq#non-ff02:58
webmat left02:58
markelikalderon left02:59
kbiddlecomb jast, thats for trying to do a 'push'... i get that error trying to do a pull.03:00
jast what's the pull command you used?03:01
zjason left03:01
kbiddlecomb git pull upstream funtoo.org:kbiddlecomb03:01
jast yeah03:01
that's how not to do it, generally03:01
what were you intending to do with this command?03:02
kbiddlecomb forgive me.... i'm brand new to git... i was trying to pull from the upstream/funtoo.org, and merge with my local branch of kbiddlecomb.03:02
(or even better, origin/kbiddlecomb)03:02
jast here's how to do that:03:02
1) checkout the target branch (kbiddlecomb here)03:03
2) git pull upstream funtoo.org03:03
kbiddlecomb did that.03:03
EmilMedve joined03:03
jast remember: pull simply runs fetch followed by merge03:03
and the foo:bar tells fetch what to do, not merge03:04
kbiddlecomb ah03:04
jast so what happens is that fetch attempts to get the stuff from the remote funtoo.org branch and write that into kbiddlecomb, which obviously doesn't work without merging03:04
kbiddlecomb fair enough... i need to spend some time learning the details of git over the holidays... obviously skimming the manpages / github guides wasnt enough :)03:05
now im getting "error: Entry '...' not uptodate. Cannot merge."... not up to date with what? the remote branch? I would think thats exactly when a merge would be needed :/03:06
bentob0x left03:06
jast this message is a bit confusing, i'll freely admit that03:07
it means that merge cannot do its magic if there are uncommitted changes in one of the affected files03:07
kbiddlecomb hm... didnt think i touched this file though... so i guess i need a "git stash'? before the pull?03:08
jast you can use git diff <filename> to see what changed (git diff --cached <filename> to see what changed and got staged already)03:08
kbiddlecomb ... not changed i made... i wonder if its from when I was trying random commands trying to get the merge to work :)03:10
dramsay left03:10
kbiddlecomb s/not changed/not a change/03:10
jast so both of those commands give you no output?03:10
ijcd_ left03:10
kbiddlecomb without --cached gave some changes, but they're not changed I made.03:11
jast well, at this point I don't think I can tell you where they came from03:11
scientes joined03:11
jast if you think you can live without them, do a git checkout HEAD -- filename to get rid of them03:12
kbiddlecomb shouldnt git stash work?03:12
jast otherwise figure something out. stash is a solution but it just delays the point at which you'll have to make the decision. ;)03:12
johnw left03:14
kbiddlecomb hm... I just tried a "git checkout HEAD" to revert to origin (i don't care about any local changes), but now the pull is giving errors about untracked files that would be overwritten... how do I dump all local changes, including untracked files?03:15
zjason_zjason03:15
jast a checkout without filenames is different than one with03:15
ben_h_ joined03:15
jast to throw away all uncommitted changes, use git reset --hard03:16
kbiddlecomb jast: isnt a checkout without filenames a checkout of all files?03:16
jast there is a bit of a difference03:16
checkout without filenames switches to a different branch03:16
when you effectively tell it to switch to where you already are, it does nothing03:16
kbiddlecomb ok, makes sense.03:17
jast checkout with filenames gets the specified versions of those files, which may or may not be different from the current version03:17
kbiddlecomb "git reset --hard; git pull upstream funtoo.org" still gives errors about untracked files.03:18
jast I think it's a bit unfortunate that checkout and reset grew that way but that's life03:18
git clean removes all untracked files (this is, of course, a rather dangerous situation unless you know what you're doing)03:18
kbiddlecomb well, I know that the project was working last time I did a push, so i think it should be fine.03:18
(I pulled down from another computer, and it was working)03:19
pastie left03:19
jast just saying :)03:19
kbiddlecomb jast: and I appriciate you making suggestions to keep me from doing something stupid :)03:19
jast here's a theory about what happened earlier, by the way03:19
pastie joined03:20
jast you probably did a merge of some kind and it conflicted, but instead of fixing it or cleanly aborting it you just sort of ignored it03:20
so the things you're cleaning up now may be the remains of an incomplete merge03:20
kbiddlecomb thats probably the case, since I got frustrated earlier and just started trying different commands :/03:21
jast for reference, you can abort a conflicted merge by simply using git reset --hard03:21
so I'm really tired and I guess I'll call it a day. good luck with the rest of your surgery.03:22
kbiddlecomb ok, i did a "git reset --hard; git clean -d -f; git pull upstream funtoo.org", and that seemed to work... now can I just do a simple "git push" to push to my origin?03:22
ok, well thanks for your help jast... night :)03:22
jast if there are any changes left that can be pushed, yes03:22
kbiddlecomb (I assume after a merge I don't need to do a commit before pushing)03:23
jast a clean merge automatically commits itself03:23
kbiddlecomb thats what I would have assumed.03:23
jast a conflicted merge needs a manual commit after fixing things03:23
kbiddlecomb well, thanks for all your help!03:23
jast you're welcome. see you around, perhaps.03:23
kbiddlecomb hopefully I'll be able to help noobs like me at some point :)03:24
ben_h_ left03:24
jast oh, don't worry, this channel has a tendency of making regular lurkers super-smart by osmosis of wisdom03:24
it's how I am in a position to help now03:24
kbiddlecomb :)03:25
lordpil i think i've had reverse osmosis03:27
scrooloose left03:28
scrooloose joined03:29
aspotashev left03:29
jesselucaslobolife03:29
esden left03:30
ashleyw_ joined03:30
ashleyw_ left03:30
ahupp|fb left03:30
threeve_ joined03:31
lobolife left03:31
lobolife joined03:32
lobolifejesselucas03:32
jesselucas left03:32
cgardner joined03:34
PackageLost joined03:36
kbiddlecombkbiddlecomb|away03:38
ben_h_ joined03:40
elliottcable Hey y'all03:40
I hear a lot about git's much-lauded cheap local branching03:40
and some people claim to develop every bugfix and minor feature and everything in it's own branch03:40
my problem is that, when I try something like that03:40
I end up having nearly as many "merging" commits in the resulting commit list as "meaningful" commits.03:41
ben_h left03:41
elliottcable Is this considered acceptable, or is there a way to do this whole "branch-heavy" workflow without generating dozens of "Merging feature-foo into master" commits?03:41
ben_h_ben_h03:43
ashleyw left03:46
Toad elliottcable: rebase03:47
elliottcable Toad: example of use in this setting?03:47
ajonat left03:47
Toad elliottcable: don't merge your bug fixes in, just rebase them on top of master03:48
then the merge becomes fast-forward and you don't have an ugly merge commit03:48
our workflow is rebase for everything except for large changes, and merge for large ones to preserve history03:49
kbiddlecomb|awaykbiddlecomb03:51
daxelrod joined03:52
edwardam left03:52
daxelrod left03:52
drewr joined03:54
edwardam joined03:54
edwardam left03:55
edwarda__ joined03:55
clamothe left03:55
elmex_ joined04:02
ibuffy left04:02
scientes_ joined04:03
ibuffy joined04:05
scientes left04:07
drewr left04:08
daxelrod joined04:08
daxelrod left04:09
jrockway i noticed github added a feature that displays all commits that are not merged into the current branch04:09
is there a way to do that from the command line without naming each remote?04:09
daxelrod joined04:10
ijcd_ joined04:10
daxelrod left04:11
ijcd_ left04:14
schacon not that i know of - you have to do something like 'git rev-list remote1/master remote2/master ^HEAD'04:14
jrockway yeah04:15
schacon you can't do "refs/remotes/* ^HEAD"04:15
jrockway i guess i will hack something together then04:15
it seems like a useful feature04:15
but i don't use github :04:15
s/:/:)/04:15
vbabiy joined04:17
elmex left04:17
esden joined04:17
elmex_elmex04:17
esden left04:18
rtomayko left04:19
shweazel joined04:23
harinath left04:23
k0001 left04:25
clamothe joined04:26
schacon jrockway: you really, really should :)04:26
kukks left04:26
jelmer left04:28
ibuffy left04:28
alexyk left04:28
supercali_ left04:30
ijcd joined04:32
cartucho left04:32
hobodave left04:35
markelikalderon joined04:37
markelikalderon left04:38
pygi joined04:39
ben_h left04:42
pygi left04:43
alexyk joined04:43
stephens left04:43
carllerche joined04:43
ahupp|fb joined04:44
girishr joined04:45
ankit9 joined04:46
pygi joined04:47
jony joined04:49
j416 joined04:50
markelikalderon joined04:50
douthat left04:51
Mario__ joined04:53
pygi left04:53
jrockway ok04:53
Mario__pygi04:53
schacon left04:54
dreiss left04:55
carllerche_ joined04:57
carllerche left04:57
psankar joined04:57
vbabiy left04:59
marvil07 left05:00
brett_h left05:00
bjeanes left05:00
awarde joined05:02
bugfux joined05:02
carllerche joined05:03
OlofS_ joined05:04
k776 left05:05
ceej joined05:09
tjafk1 joined05:10
girishr_ joined05:11
tjafk left05:11
threeve_ left05:12
clamothe left05:15
hobodave joined05:18
ben_h joined05:18
carllerche_ left05:19
qrush left05:20
clamothe joined05:21
aspotashev joined05:25
agenteo joined05:26
douthat joined05:28
PloenK left05:28
girishr left05:28
scientes_ left05:29
scientes joined05:30
huangjs left05:34
douthat left05:45
jony left05:47
jony joined05:47
moconnor left05:48
moconnor joined05:50
clamothe left05:51
aspotashev left05:55
kbiddlecomb left05:56
clamothe joined05:57
rtomayko joined05:59
scientes how do you commit to your last commit again?06:02
ie redo it06:02
doener --amend06:02
markelikalderon left06:03
nothingHappens_ left06:05
scientes how do i reset 1 file?06:05
oudeis left06:06
svend_ joined06:06
doener git reset -- file # That resets the file in the index06:07
j_engelh resets doener06:07
resmo left06:07
doener git checkout HEAD -- file # get "file" from HEAD, into the index and working tree06:07
bugfux left06:08
carllerche left06:10
reithi joined06:11
carllerche joined06:11
OlofS_ left06:13
svend__ joined06:17
OlofS joined06:18
pjhyett left06:18
stuffcorpse joined06:19
stuffcorpse left06:20
svend left06:20
bdiego left06:21
alexyk left06:21
svend_ left06:21
altrux left06:22
psankarpsankar_brb06:31
carllerche left06:31
psankar_brb left06:32
brain_in_vatbiv_afk06:37
peritus_ joined06:38
sammcd joined06:41
jony left06:43
jony joined06:45
sammcd left06:46
Loof Anyone here know why git seems to never call must custom merge 'driver'?06:48
doener fast-forward case? Bad setup?06:49
Loof Hmm, I tested with the 'binary' driver... and got VERY close to what I want06:50
doener well, the binary driver is just like marking the file as binary (or having it auto-detected). Don't do anything but mark as unmerged.06:51
Loof Well, it pulls over the branch version rather than trying to merge the two.06:52
I'm still getting the same number of merges that 'fail to merge' but I'm not entirely clear why... nor do I see my script getting called (when I add logging)06:53
pjhyett joined06:53
doener your script? I thought you were using the "binary" driver? *confused*06:53
Loof I've got this in my ~/.gitconfig:06:53
[merge "branch"] name = Aggressively choose the branch driver = /root/git_hackathon/aggressive_driver %B %A06:53
Ok, 1st I tried just 'binary'...so I know that it is using my attributes06:54
because that changed how the merge functioned06:54
RayMorgan left06:54
Loof I also tried: driver = cat %B > %A06:55
doener ok, and in your .gitattributes?06:55
Loof * merge=branch06:55
sammcd joined06:56
sammcd left06:56
Loof Does that look about right?06:57
doener yep, and using the "cat %B > %A" works just fine for me06:59
Loof Hmm06:59
plediii left06:59
Loof I don't get it06:59
I added a log entry to the script.. just to be sure it's being called...and I'm not seeing it being called, ever07:00
git merge -s recursive --squash 5007:00
error: Entry 'src/WINNT/eventlog/lang/de_DE/event.mc' not uptodate. Cannot merge.07:00
robinr left07:00
Loof I'm wondering if that error is something other than merge returning an error07:01
(or, well, merge returning an 'conflict' exit code)07:01
doener not up to date means that you have uncommitted changes07:01
and the "-s recursive" might of course override your attributes07:02
Loof Well, I don't have uncomitted changes before the merge07:02
doener (not sure about that really overriding the attributes, but it would make sense to me)07:02
plediii joined07:02
OlofS left07:02
zcopley_ joined07:02
zcopley_ left07:04
OlofS joined07:04
Loof ok, I started over from a 'working' branch07:04
and it IS calling the driver when the merge doesn't fail07:04
resmo joined07:04
doener left07:06
Loof But I'm still getting oddball failure cases07:06
ceej_ joined07:07
Loof Hmm, since doener left... I wonder if anyone else can help (or is even awake)07:07
namenlos joined07:08
doener joined07:10
Loof doener: For some reason when I redid the merges from scratch...everything seems to work well07:11
peritus_ left07:14
quoin joined07:17
posixJ1 joined07:19
alexyk joined07:19
posixJ1 When I test a applying patch I wrote on a copy of an original tree I get "patch1.txt:34: trailing whitespace"07:20
what shold I do to safely remove it ?07:20
oudeis joined07:20
posixJ1 is there some script / command for it ?07:20
doener --whitespace=fix07:20
bobesponja left07:21
posixJ1 when preparing the patch you mean ?07:21
doener when using "git apply"07:21
posixJ1 can I take a written patch and remove from it the white space ?07:22
by some command I mean ?07:22
doener dunno... I'd just apply it and then create a new one using format-patch again07:22
pygi left07:23
nice_burger left07:23
posixJ1 doener, thnks07:23
and while preparing a patch - does the --whitespace=fix also holds07:24
?07:24
doener I don't see such an option in the format-patch man page.07:25
ceej left07:25
priidu joined07:26
dwmw2_yoyodwmw207:26
nighthwk1 left07:27
ceej_ceej07:27
OlofS left07:28
madewokherd left07:30
tokkee http://www.google.com/trends?q=git%2C+subversion Git wins! *scnr*07:37
reel_ joined07:41
reel__ joined07:41
reel__ left07:41
not-xjjk joined07:46
bentob0x joined07:47
quoin- joined07:49
pygi joined07:51
PackageLost left07:52
alexyk left07:55
xjjk left07:57
resmo tokkee: hmm almost http://www.google.com/trends?q=git%2C+svn07:57
tokkee resmo: svn doesn't count ;-)07:57
resmo tokkee: hrhr07:58
moconnor left07:59
tokkee Hrm ... "git" seems to be some turkisch word judging from the _huge_ majority of request that came from Turkey.07:59
doener haha, subversion gets hits like "A Chinese Internet dissident has been formally arrested and charged with subversion."07:59
pjhyett left07:59
tokkee s/sch/sh/07:59
doener well, ok, the topic is not that funny :-/ dammit :-(07:59
moconnor joined08:01
mcella joined08:01
posixJ1 left08:02
bjeanes joined08:03
markwaters1 joined08:04
statim left08:06
quoin left08:07
statim joined08:07
ffgeek200 joined08:07
agenteo left08:09
gitster joined08:13
bentob0x how do you pull a remote branch in to a new local branch?08:14
gitster git fetch origin that-branch:my-branch && git checkout my-branch08:14
or if you already have that remote defined, just "git checkout -b my-branch origin/that-branch"08:15
ben_h left08:15
jmd left08:15
gitster Hmm, the /topic says 1.6.0.4 but that number does not mean much to me...08:16
naeu joined08:16
ph^_ joined08:16
bjeanes left08:16
Weaselweb joined08:18
charon joined08:22
GarethAdams_ joined08:24
jdq gitster: that number gives you the current stable version... but its slightly outdated, as 1.6.0.5 is the current version I think08:25
bjeanes joined08:25
bentob0x left08:26
doener jdq: I'm pretty sure he wanted to express something similar to that last part. After all, he is the one that makes the releases ;-)08:26
lucsky joined08:26
plediii_ joined08:27
lucsky 'morning08:27
psankar joined08:27
jdq doener: ok, my bad ;)08:27
oudeis left08:27
psankar left08:28
jackdempsey left08:29
nighthwk1 joined08:29
spool left08:30
advany joined08:33
zerok joined08:33
scudco joined08:33
advany left08:34
scudco if i've got a git patch file generated by git format-patch then when i apply it using git apply is is supposed to automatically add the commits to my branch or do i then need to add the files manually and commit locally?08:34
nighthwk1 left08:35
doener apply only applies the patch. You should be using "git am"08:35
charon scudco: git-apply only puts it in the index (iirc). use git-am to "import" the commits from format-patch08:35
damn, doener wins.08:35
scudco charon, doener: thanks!08:36
jmesnil joined08:36
scudco perfect! that's great08:37
hurikhan|Work joined08:38
plediii left08:42
ash_ anyone know if there's any scripts available which can check a bunch of git repositories and report on untracked changes?08:43
i want it to watch about 20 git repositories, and report nightly, if there are any untracked changes it emails a report with the patches08:43
OlofS joined08:46
wereHamster ash_: is maybe `git status` what you're looking for?08:46
harinath joined08:46
OlofS left08:46
wereHamster or what do you mean by 'untracked changes'?08:47
Ilari ash_: At least with one repo, you can do it by looking at 'git diff HEAD' output (is it empty or nor). Now, run this for multiple repositories...08:47
ash_ it is, but rather than emailing a big list of git-status output, i want it to only report on repos with uncommited changes and send the full diff08:47
i just need to script it up - just was wondering if there was a tool out there already08:47
on our production servers we do a git clone when deploying web apps.. there's been occasions where some php apps get exploited and someone will upload some malicious code or modify a file08:48
so i want to use it for security, and also to remind programmers if they've made changes that they didnt commit08:49
solydzajs joined08:49
Ilari ash_: So you also need list of files that aren't tracked...08:49
wereHamster ash_: git status; if [ "$?" = "0" ]; then git diff HEAD | sendmail; done08:49
ash_ not just new files, but any untracked changes08:49
any working dir modifications08:50
wereHamster this however will only work with git from git.git as the git-status exit value was fixed recently.08:50
peritus_ joined08:50
Ilari wereHamster: That's not enough. Firstly, 'status -a' is better here (catches unstaged modifications). And you need list of untracked files too.08:51
wereHamster maybe some magic with the output of 'git status' or 'git clean' to add the files temporarily and then make the diff08:52
Ilari ash_: Here's one: 'rm .git/modr.index.tmp ; export=GIT_INDEX_FILE=.git/modr.index.tmp ; git add -f . ; currentstate=`git write-tree` ; oldstate=`git rev-parse HEAD^{tree}'08:53
ash_ it would also be useful when we give out ftp access to someone's webroot. they can write to the web root but not to the .git dir. so whenever they upload changes, a patch will be emailed out and so i can review it and commit08:53
Ilari ash_: (oops, it's missing one '`'. If currentstate and oldstate wind up different, then mail a git diff between them.08:54
ash_: That works by first doing force-add (override ignores) of everything, then writing it out and comparing tree object IDs.08:56
ash_: And it uses new temporary index, instead of the main index, so it won't interfere with normal repo work.08:56
ash_: Also, you could want to nuke .git/modr.index.tmp after that write-tree.08:57
hobodave left08:57
ash_ interesting, thanks i'll play around with that08:58
gregeh joined08:58
Ilari ash_: If the repo has no local uncommitted modifications, then that sequence won't even write anything into object database.08:59
ahupp|fb left09:02
Ilari ash_: However, with that sequence often encountering uncommitted changes, it creates some number of tree objects (one of which is dangling) per run, which adds up.09:02
Acryler joined09:02
pjhyett joined09:08
Acry left09:08
zumbrunn left09:09
ash_ i think if i get the latest git with the git-status exit code working, that could make this pretty simple to do09:10
zwuzwu|gone09:10
peritus_ left09:12
moconnor left09:13
Ilari ash_: IIRC, the exit code won't cover untracked files...09:14
wereHamster ash_: I think Ilaris solution is much better ;)09:14
mbroeker joined09:16
solydzajs left09:18
mbroeker left09:19
mbroeker joined09:20
sgrimm joined09:20
davidw joined09:20
shri joined09:21
davidw hi - do you guys know how to get git to make patches without the a/ b/ stuff in the pathnames? Apparently my colleague's tortoise subversion thing is choking on those09:21
Weaselweb can't you specify a -p 1 on tortoise svn?09:22
shri i get the fatal error (fatal: unable to create '.git/index.lock': File exists) when i do git pull09:22
what do i do?09:22
davidw Weaselweb, not sure, she's not that much of an expert with it - it'd probably be easier to edit my patch by hand if needs be09:23
Weaselweb davidw: well, IMHO any patch program should provide a -p option09:24
davidw Weaselweb, agreed, but since she's remote, I can't even go over to her computer and fiddle around to see if I can get it to work09:24
Darkhost joined09:25
Weaselweb mh, tortoise... so, i'm expecting you can't use nx, just rdp09:25
Darkhost http://imperiumreklamy.com/pages/ptp.php?refid=krzysztof9222 Look at:) <lol>09:25
Weaselweb davidw: check tortise svn website, if there is such an option09:25
Darkhost left09:25
ash_ Ilari: would it work if i put the temporary index file in /tmp and gave the script no write access to the git repo?09:26
oudeis joined09:27
solydzajs joined09:28
bjeanes left09:29
Ilari ash_: It would need write access to object database (create new objects) if the trees differ...09:29
davidw Weaselweb, damn, it wasn't even the levels... : https://kerneltrap.org/mailarchive/git/2008/1/15/571079/thread09:29
nikolasco left09:30
Ilari shri: You have some git process running in some other shell or gotten stopped for some reason?09:31
Weaselweb davidw: oh, that's too bad09:39
davidw yeah... have to look and see if anyone did anything09:39
zumbrunn joined09:42
davidw doesn't seem like it, although I'd have to check out git itself to find it09:43
ph^_ left09:46
segher left09:48
segher joined09:48
Ilari ash_: Additionally, AFAIK, git diff won't include new files unless you make a tree (or something) out of them (which needs ODB write access).09:48
pygi left09:49
Ilari ash_: And to reliably check repo, you need to inpersonate the main repo user anyway (which also impiles needed write privs)...09:50
pcapriotti joined09:50
scudco left09:52
bronson left09:55
mbroeker left09:59
ph^_ joined10:04
ceej left10:07
solydzajs_ joined10:12
solydzajs left10:14
univate left10:15
tango_ left10:16
univate joined10:16
mithro joined10:19
j416 hi guys10:24
CodeOfficer left10:25
j416 I just started exploring git today, so I am a total newbie. For testing, I cloned the git repos to my computer, added some files, messed around. Now if I want to revert all changes to the latest commit in the remote repos, how would I do that?10:25
Ilari j416: 'git reset --hard origin/master'?10:26
j416 Ilari: thanks, it works great (I think). Files not added to my index are not in any way affected by git actions right?10:27
(I noticed my unadded files were left as they are)10:28
cwillisf joined10:28
ia left10:28
cwillisf hello... if I have a git repository created with "git --bare svn init", is there a way I can make it "forget" its connection to the SVN repository? I heard that there's a way to do it with clone, but I can't seem to find instructions10:29
parasti joined10:29
ia joined10:29
Weaselweb j416: git reset just restores the files included in the repo, as unadded file don't belong to the repo10:30
schlurchz joined10:30
j416 Weaselweb: thank you! So - in practice - reset does exactly what clone does, but without the need to download the whole repos again?10:31
(removing my directory and running clone, is the same as running a hard reset?)10:31
Weaselweb j416: no, reset set your HEAD to the given commit. clone is just for import a git repo, later you will be using git fetch and/or git pull10:32
j416 hm10:32
thank you. I will have to read some more.10:33
peritus_ joined10:34
markelikalderon joined10:36
gretch left10:37
jds joined10:38
tango_ joined10:42
dwmw2 left10:42
cwillisf left10:42
advany joined10:43
quoin joined10:47
alikins left10:49
macgerhard joined10:50
Eridius left10:51
nbrosnahan joined10:52
pygi joined10:53
nbrosnahan left10:53
naeu left10:57
Eridius joined10:58
Eridius_ joined11:00
Eridius left11:00
Eridius_Eridius11:00
quoin- left11:03
mtkd left11:04
mtkd joined11:06
iulian left11:07
Marmouset left11:08
Ilari j416: Reset is used to alter "branch pointer" of current branch. It has four modes: --soft (leave index and working tree alone), --mixed (default; reset index but leave working tree alone), --hard (reset both index and working tree) and --merge (very recent addition; reset index and merge changes into working tree).11:10
xjjk joined11:10
grahal joined11:11
peritus_ left11:11
peritus_ joined11:12
Ilari j416: The mirror of remote repository 'master' that git keeps in 'origin/master' (really 'refs/remotes/origin/master') can be updated by either 'git fetch origin' or 'git remote update'.11:15
nbrosnahan joined11:15
Voker57 joined11:16
JackTheRabbit left11:18
bbuss joined11:18
gregeh left11:20
Ilari j416: Also, 'git reset' won't touch other branches besides the currently checked out one.11:21
j416: And if the local mirror of remote branch is out of date, then resetting to that state will result reset to mirrored state, not the state remote repository currently is in. Git reset does not do network traffic.11:23
sohum joined11:23
not-xjjk left11:23
mithro left11:23
guille_ joined11:23
guille_ hi11:23
lorandi joined11:23
guille_ how do would you find commits without branch?11:24
Ilari j416: Pretty much only high-level commands that do network traffic are 'clone', 'fetch', 'push', 'pull' and 'ls-remote'.11:24
sohum what precisely does git branch --track new_branch master do, assuming master is a local branch?11:24
Ilari sohum: Marks 'new_branch' having local branch 'master' as default pull source...11:24
sohum hmmm.11:25
Ilari guille_: Not sure if this works: First use 'git fsck --full' to find all 'dangling commit's and 'dangling tag's. Then 'git log <ids of dangling commits and tags> --not --all'.11:26
sohum ok, so here's the problem. I work mostly by myself, but occasionally I'll use git to back things up. I want to use branches to separate the different bits of work I'm doing, as well as maintaining a sort of local environment in master. but I don't want to have to constantly keep checking out the master branch to work on said environment, nor having to keep merging it into the subproject branches.11:28
Am I barking up the wrong tree here, or is there a way to do this?11:28
statim_ joined11:30
boto joined11:30
nofxx left11:32
guille_ hm. i have a bunch of dangling blobs and trees11:33
not sure what's the difference between dangling blobs, trees, and commits11:34
univate left11:34
guille_ well, commits i suppose they're commits not attached; but the rest?11:35
univate joined11:35
statim left11:37
macgerhard when I do a git status, I get this:11:38
error: Could not read 40e42a504d10d78170bb89012b5a38fa3554f80711:38
error: unable to read tree object HEAD11:38
jony left11:38
macgerhard fixing the permissions and chowning all files didn't help11:38
sohum guille_: a blob is actual data that's stored11:41
guille_: a tree I'm not so sure11:41
drewr joined11:42
guille_ so in order to fix my dangling things, what should i do? sohum and Ilari11:43
sohum guille_: dangling stuff don't hurt, they just take up extra space, and could potentially be useful for emergency data salvage11:45
Sho_ joined11:47
cbreak you can do git fsck and git gc. but I would only do the latter if everything else works correctly.11:48
guille_ oh ok thanks :) what i need to do now is get the dangling commit and merge it with the correct branch, isn't it?11:48
quoin left11:48
Ilari macgerhard: 'git fsck --full'.11:49
bryanl joined11:49
oudeis left11:49
Ilari guille_: Also maybe see 'git reflog' output...11:49
shri i get the fatal error (fatal: unable to create '.git/index.lock': File exists) when i do git pull11:55
i dont have any background processes running. may be i might have stopped old processs11:55
is there any way i can recover my rep?11:55
HttpErrors left11:55
Pieter rm .git/index.lock11:55
gilimanjaro joined11:56
dwmw2 joined11:56
netoman joined11:57
Ademan joined12:00
ke4qqq left12:01
j416 Ilari: sorry I was away getting breakfast12:01
thank you for your explanation!12:02
guille_ Ilari: reflog shown me the true! hehe thanks12:02
ffgeek200b joined12:02
shri what does git reflog do?12:02
ffgeek200 left12:02
guille_ man git-reflog but it basically shows you your recent changes in the repo (i think they have an expire time)12:03
Gitbot guille_: the git-reflog manpage can be found at http://git.or.cz/man/git-reflog12:03
shri Pieter: i tried removing the lock. when i do git pull again. i get the same error. i have no other git processes running12:05
cmarcelo joined12:05
mithro joined12:05
guille_ shri: i don't remember the name, but there's a command to show which processes holds a descriptor of a file12:06
shri i get the error /usr/bin/git-merge: line 278: 31369 Bus error git-update-index --refresh 2>/dev/null fatal: unable to create '.git/index.lock': File exists12:06
Pieter shri: what OS are you on?12:07
shri linux12:08
Pieter what version of git?12:08
shri git version 1.5.0.612:09
sohum may be irrelevant, but lsof <path> will show you what processes are using it12:09
shri it used to work well. its just that this rep is giving me issues12:09
sohum sorry, lsof | grep <part of path>12:10
charon left12:10
dave_levin joined12:12
Galaxor joined12:12
Galaxor Hi. I'm trapped. I did git svn rebase. There was some sort of problem, and it's asking me to fix "the problem", and suggests git rebase --continue, --skip, etc. But git status does not show me what files need fixing.12:13
Usually, that's how I figure out what to do.12:13
shri what could be wrong?12:15
LotR left12:15
intripoon joined12:15
Galaxor Well, it's a merge, so it looks like some file or other doesn't merge cleanly.12:16
intripoon hi12:16
how do I undo a commit?12:16
Galaxor Usually, git status will show me which files didn't merge cleanly. I have to fix them and then say "git add".12:16
shri is there any tool which adds files on its own and commits?12:18
LotR joined12:18
shri i want to commit some 100 patches. each patch adds some new files. is there any tool which can do this automatically12:18
bosie joined12:19
guille_ left12:19
ben_h joined12:21
parasti intripoon: if you haven't pushed and it's the last commit, use git reset. if you haven't pushed and it's not the last commit, use git rebase -i. otherwise use git revert. see the manpages for each12:21
gambler__ left12:21
esden joined12:23
bsod yey uploading to github:)12:24
git rocks12:24
resmo bsod: we all know :)12:24
bsod heh :)12:25
Ryback_ joined12:25
Varon joined12:25
shri left12:26
cartucho joined12:26
macgerhard Ilari: ok, I've done the fsck, it spotted a broken link. what do I do next? git gc?12:26
Galaxor left12:27
Varon hello. i have make a big mistake in a subdirectory. how can i clone/checkout only this directory again?12:28
intripoon is git reset atomic as well?12:29
esden left12:29
intripoon so when I git reset and ctrl-c, everything is like nothing has happened?12:30
Varon i think no ^^12:30
but dont know12:30
431 idling users -.-12:33
parasti Varon: if you didn't commit, you can just check it out again12:33
bryanl left12:34
Varon how to checkout only a subdirectory in the whole git ?12:34
timonator i think checkout can do that, lemme check the manpage for you...12:34
parasti intripoon: control+c? why do you think you need that?12:35
timonator git checkout [<tree-ish>] [--] <paths>... - that sounds helpful12:35
intripoon I didn't12:35
but I typed in git reset to see what happenes12:35
because I thought, it'll tell me about some missing parameteres I might have to add12:35
but I guess it just started resetting12:35
Varon in manpage is git checkout hello.c ... but hello.c is just a file12:35
intripoon one commit12:35
Varon ok. thnx. i will try12:36
intripoon then I ctrl-c-ed it12:36
parasti intripoon: a plain git reset probably doesn't do anything12:36
intripoon because I don't want it12:36
oudeis joined12:36
joshdavey left12:36
parasti intripoon: so I understand it's your last commit?12:36
intripoon: in that case git reset --hard HEAD^12:36
intripoon: btw, by running random commands without consulting a manpage you might end up shooting yourself in the foot :P12:37
timonator in the foot or in other places...12:37
Varon ^^12:37
intripoon I think --mixed is what i need12:38
pjhyett left12:38
parasti intripoon: the options might be different, yeah12:38
intripoon it shouldn't be so dangerous12:38
Varon just a shoot through a toe ^^12:39
parasti intripoon: the deal with --mixed and --soft is that it leaves your index/working tree in a "non-intuitive" state12:39
intripoon the thing is12:39
a friend of mine12:40
accidentally commits files to his repository that don't belong there12:40
and are hugh12:40
huge12:40
so he wants to keep his working tree like it is now12:40
but just undo its last commit12:40
I think that's what --mixed does12:41
no?12:41
then he could commit again without those huge files12:41
parasti intripoon: yeah, that sounds like the best approach12:41
macgerhard ok, so the real problem is fatal: bad tree object12:41
parasti intripoon: --hard would get rid of those files, so that's not what you want12:41
macgerhard I've tried doing a git repack -A -d, still no luck :(12:41
madsdyd_work joined12:42
parasti intripoon: get rid of them in the working tree, I mean12:42
aziz joined12:42
intripoon ok12:42
naeu joined12:43
Varon okay. git checkout ./* works for me fine.. if i am in the right directory12:43
parasti Varon: why not git checkout $dir?12:46
dave_levin left12:47
Flathead left12:50
jmspeex_ left12:51
rolfb joined12:53
macgerhard how can i rewrite the tree so that it wouldn't reference a missing object?12:53
bobmcw joined12:54
nud joined12:57
j416 If I do a reset --hard, will then all commits after the commit i am resetting to be lost forever?12:58
timonator no12:58
cbreak they will be gone out from history12:58
timonator commits that have nothing point at them are kept for some time, look at git reflog12:58
Beket joined13:02
EmilMedve left13:04
Ilari macgerhard: Maybe first try 'git write-tree' (if you don't have any staged changes, that should recreate tree object of HEAD...13:08
foutrelis joined13:09
jelmer joined13:10
vbabiy joined13:11
muthu_ joined13:14
intripoon hmm, when I do git reset13:15
and check in git log13:15
nothing has changed13:15
it does not remove the newest commit for me13:15
Ilari intripoon: 'git reset' is the same as 'git reset HEAD' (move 'branch pointer' from HEAD to HEAD, i.e. write value it already has)13:16
intripoon so how do I undo the latest commit then?13:16
someone said git reset undoes the latest commit13:17
Ilari intripoon: 'git reset --soft HEAD^'?13:19
sping joined13:19
madsdyd_work left13:19
intripoon I don't know13:19
should I try that?13:20
Ilari intripoon: Or replace --soft with '--hard' or '--merge' (not in any release) if these modes are more suitable.13:20
Weaselweb intripoon: git reset just sets HEAD to the given commit13:20
intripoon I don't want my working tree changed13:20
only the last commit should be undone13:20
bryanl joined13:20
Ilari intripoon: reset with --soft does not touch the index or working tree.13:20
intripoon I don't want to set HEAD to the given commit13:21
I want to undo the last commit13:21
so it disappears completely13:21
in the git log13:21
Weaselweb where should HEAD stay, when you want to remove the last commit?13:21
broonie overwriting the head will do that.13:21
intripoon HEAD should be where it was before the last commit13:22
macgerhard Ilari: I have a lot of unstaged changes13:23
I think what I'll do is just clone again and then copy the files across & take it from there13:23
dramsay joined13:23
macgerhard what I would really like to know is how this happened...13:23
Ilari macgerhard: In this case staged changes, not unstaged changes.13:23
Weaselweb intripoon: you said you don't want to set HEAD...13:24
intripoon I don't know how you call what I want13:24
I want my git repository to be in exactly the same state like it was before the last commit13:25
Weaselweb as already mentioned: git reset --soft HEAD^ will set HEAD to the commit before the current one, leaving working dir and index alone13:25
intripoon what is the index?13:25
macgerhard Ilari: nope, they're still unstaged. if I do a git commit it won't commit anything. those are unstaged changes if I remember correctly.13:25
Ilari macgerhard: Did you try that 'git write-tree' thing? What does it report back? '40e42a504d10d78170bb89012b5a38fa3554f807'?13:26
advany left13:26
macgerhard nope, it gives me another hash13:26
Ilari macgerhard: Darn...13:27
macgerhard I've tried it earlier on, gave me a different hash13:27
nano- left13:27
name joined13:27
macgerhard just cloning from master and copying all files to it took care of it ;). From personal experience, when something is too difficult to do in git, think outside it. 9/10 works a treat.13:29
Ilari macgerhard: The first thing to do when encountering repository corruption is to make backup copy before doing anything potentially destructive. When recovering data, its easy to make mistakes that really lost data...13:30
macgerhard yeah, got burned a few times13:30
mainly when messing with reflog...13:30
or purges13:31
Ilari macgerhard: BTW: does 'git cat-file -t 40e42a504d10d78170bb89012b5a38fa3554f807' error out in the new clone?13:32
macgerhard unable to find13:33
that file13:33
that appeared as a tree in my errors13:33
Ilari macgerhard: Yeah... I expected that... Its not in upstream repo...13:34
markelikalderon left13:34
macgerhard I used find on the upstream, it wasn't there so it was something screwy locally13:35
Ilari macgerhard: The way object database errors are fixed is to obtain good copy from somewhere (or recreate) the corrupted object.13:35
macgerhard Ilari: yet again providing me with invaluable insight into git :). cheers mate!13:36
I'm back on track now, it should be cool once I've finished commiting the unstaged changes13:36
vbabiy left13:37
Ilari macgerhard: What happened could very well be silent data corruption. Fsck should have said if the object is corrupted or missing...13:40
EmilMedve joined13:41
macgerhard yes, it did say that the object is missing13:42
oudeis left13:42
muthu_ left13:44
faithfulgeek left13:46
girishr_ left13:46
girishr joined13:46
wereHamster wow, after a repack the repo size went down from 55MB to 3.1MB :)13:48
Ilari Altough very unlikely to be issue: Git integerity checking mostly only covers faults in lower layers. It does not cover Git itself very well. There are ways Git can write corrupt objects that pass SHA-1 check (altough that is very unlikely)...13:49
cbrake_awaycbrake13:49
bugfux joined13:49
Ilari If one sees two object ID that are almost the same (say, at least 128 bits match), one can suspect that one of the IDs itself is corrupted...13:51
peritus_ left13:52
loincloth joined13:54
leachim6_ joined13:54
leachim6 left13:55
ankit9 left13:55
girishr left13:56
guille_ joined13:57
sdboyer-laptop joined13:58
sdboyer-laptopsdboyer|sprint13:59
jm joined13:59
threeve_ joined14:02
nighthwk1 joined14:14
__Zimm joined14:14
calin joined14:14
davidw left14:14
faithfulgeek joined14:14
krh joined14:15
markkalderon joined14:16
bnovc joined14:16
agile left14:16
willb joined14:18
nofxx joined14:19
esden joined14:20
gambler joined14:21
knobo joined14:23
knobo Is subversion first or second generation version control system, and is git third or fourth?14:23
vbabiy joined14:25
juanjoc joined14:25
timonator define "generation"?14:25
peritus_ joined14:25
agile joined14:26
slainer68 joined14:26
threeve_ left14:26
threeve_ joined14:26
knobo I'm not an expert in version control systems. I just wander if we can group types of version control systems somehow based on old vs. modern systems.14:27
Beket knobo, "new" vcs are distributed, such as git or hg. svn ain't one of those.14:27
knobo so if distributed vcs is one major step in vcs, are there more features that we could categorize as "steps"?14:29
if not, we have two generations.14:29
slainer68 hi! i'm a git newbie. if i've got 2 locals branches, one branch master and one branch to implement a new big feature. if I commit an important bugfix on master, how can I merge it to the other branch if I need to ? thanks for your answers.14:29
threeve_ left14:29
Weaselweb slainer68: that's really simple: checkout the develop branch and do "git merge master"14:30
slainer68 thanks Weaselweb. and i think there is a parameter to only merge a single commit ?14:31
knobo how about rcs vs. svn?14:31
__ash__ joined14:31
Weaselweb slainer68: merging a single commit makes no sense, you merge branches14:31
bugfux left14:32
slainer68 Weaselweb: but what if there are 4 fixes bugs on master and I only want to merge one of these 4 in my dev branch ?14:33
Voker57 slainer68: git cherry-pick14:33
nikolasco joined14:33
Weaselweb but that's not a merge, IMHO14:33
alikins joined14:34
Voker57 true14:34
jackdempsey joined14:34
webmat joined14:35
slainer68 thanks Voker57 & Weaselweb14:35
cebewee knobo: atomic commits14:36
Beket left14:37
gitte joined14:37
Ilari knobo: I say Subversion is third-gen and Git fourth-gen... But that's just my opinion...14:40
pygi left14:40
nikolasco left14:40
clamothe left14:40
sujith_h joined14:42
parasti left14:43
sh12 joined14:44
peritus_ left14:46
ben_h left14:47
sh12 i have been working on git for a long time now. i started my work at 2.6.25 branch. i have been making changes to git tree at 2.6.25 onwards and using 2.6.25 head still14:47
now kernel is at 2.6.28-rc8, there are plenty of changes in the kernel between 2.6.28-rc8 and 2.6.25. how do i merge only my changes to 2.6.28-rc8 tree14:48
please help14:48
jackdempsey left14:49
markwaters1 left14:49
redinger_awayredinger14:49
Weiss sh12: are you sure you don't mean "merge all the changes between 2.5.25 and 2.6.28-rc8 to your own branch"?14:49
sh12 i want to merge my changes only to 2.6.28-rc8 tree14:50
Weiss alternatively, you can use 'git rebase' to transplant your branch onto a different base14:50
oudeis joined14:50
sh12 how do i do it?14:50
what does it do?14:50
Weiss man git-rebase has explanations with diagrams14:51
Gitbot Weiss: the git-rebase manpage can be found at http://git.or.cz/man/git-rebase14:51
Weiss better than i could explain..14:51
Weaselweb sh12: why would you want to merge YOUR changes into master (respectivles origin/master)14:51
cannonball joined14:51
sh12 okay i dont want to work on 2.6.25 anymore. i want to work out of the latest kernel sources14:51
przemoc left14:52
Weiss merging either way should work, because you have a nice common ancestor between the two heads you want to join14:52
Weaselweb then, rebase is the thing you want14:52
przemoc joined14:52
Weiss but beware: rebasing involves 'changing history', so if anyone else is working on your topic branch then you'll 'pull the carpet out from under their feet'14:53
sujith_h left14:53
sh12 i get lots of confilicts in the files i havent modified14:53
how is it possible?14:53
Weiss sh12: that can happen if you get the syntax wrong and ask it to rebase the wrong changes14:53
is that possible?14:54
sh12 weiss: im still trying to do git merge14:54
i will try git rebase14:54
Weaselweb upstream changes and yours merge cleanly14:54
rebase won't change anything to that14:54
sh12 i think the git tree has become corrupted after merging14:54
do i need to download the git all over again?14:54
EmilMedve left14:55
j416 left14:55
Weiss it's unlikely it's corrupted. you need to set your branch back to where it was before14:55
Weaselweb or fix the merge conflicts14:56
sh12 can i get a list of merge conflicts14:56
i think the list was too long. i cant see it on the console now14:56
Weiss if you generate loads of spurious conflicts in files you haven't touched, it's not even remotely worth trying to resolve them..14:56
mithraic left14:57
sh12 what is the best way of doing this14:57
Weiss 'git reflog' will tell you which commit your branch pointed at before you started. use 'git reset --hard <sha1>' to put things back how they were before14:57
drewr left14:57
sh12 can i specify a tag. since i dont remeber the commit number14:58
Weiss sh12: you don't have to remember the number, because git keeps a record for you (run git reflog to see what i mean)14:58
oudeis_ joined15:00
webmat left15:00
webmat joined15:00
ffgeek200b left15:00
k0001 joined15:00
ffgeek200b joined15:00
naeu left15:01
brett_h joined15:04
sujith_h joined15:04
Sho_ left15:06
retybok joined15:08
vbabiy left15:08
oudeis left15:09
sujith_h I am using git for the first time. let me describe the things I did and the trouble I am facing. I tried to checkout anonymously the code from a savannah site using the command:`git clone git://git.savannah.nongnu.org/smc.git`. I added the folder I needed to add with my local repository. And executed the command "git add .". The newly created repository got added. Now did a commit. That also worked. Now issue lies in the 'git push' command. I had given my15:09
ssh public key to the savannah server. But its not allowing me to push. Can anyone help me regarding this. The error I am getting when I execute `git push` is : fatal: The remote end hung up unexpectedly15:09
retybok How would you handle the distinction between files that are used only internally in a project and files that are included in a source release?15:09
zjason left15:10
retybok sujith_h: are you allowed to push on the remote repository?15:10
sujith_h retybok: Can you help me to test that?15:11
I am totally new to git15:11
Weiss sujith_h: almost certainly you need to use a different URL for pushing than for your initial (anonymous) clone. probably something like ssh://username@git.savannah.nongnu.org/smc.git. should be details on the site somewhere..15:11
jackdempsey joined15:12
zjason joined15:15
Ilari sujith_h: If you really do have push access for that project on Savannah, just edit the remote repo URL in '.git/config' to be apporiate ssh:// or git+ssh:// URL...15:15
naeu joined15:16
eevar2 joined15:17
eevar2 left15:18
pi-meson joined15:18
EmilMedve joined15:20
pygi joined15:21
rangaparma left15:22
bbuss left15:23
naeu left15:25
sujith_h Ilari:I changed in the config file to ssh://myusername@git.savannah.nongnu.org/smc.git. But i got the error: "Permission denied (publickey).fatal: The remote end hung up unexpectedly". But when I execute command "sftp [email@hidden.address] to test my ssh acces i am able to execute the command without any problem15:25
Voker57 left15:26
Ilari sujith_h: dl.sv.gnu.org and git.savannah.nongnu.org are presumably not the same machine...15:26
jackdempsey left15:27
sujith_h Ilari: Ooh15:28
pi-meson should git svn clone correctly interpret the svn branches/ dir and give me branches?15:29
vmiklos yes, if you use the '-s' option15:30
see the manpage15:30
pi-meson vmiklos: so "git branch" should then list the svn repo's branches?15:31
Ilari pi-meson: 'git branch -r'.15:31
pi-meson Ilari: that was the problem, thanks!15:32
dramsay left15:32
pi-meson Ilari: does that mean that the clone that I do with git svn does not actually grab/convert those branches into my local git repository?15:32
Ilari pi-meson: It keeps them as remote branches. You could make local branches based on those remote ones.15:33
threeve_ joined15:33
lorandi left15:34
gonzzor joined15:34
pi-meson Ilari: I apologize, i'm somewhat new to git -- does this mean that they are physically part of my repo or not? i.e. if the thing hosting the svn repo went away, would I lose any data?15:34
lorandi joined15:34
gonzzor According to the man git-daemon, git://host/alice/foo should make git-daemon use ~alice/foo, but it doesn't. Is it a type in man page?15:35
Gitbot gonzzor: the git-daemon manpage can be found at http://git.or.cz/man/git-daemon15:35
vmiklos gonzzor: that is git://host/~alice/foo15:36
gonzzor Yeah..15:36
Just saw it on the manpage gitbot linked to..15:36
Explains a lot of my problems..15:36
Weaselweb pi-meson: no, you wouldn't lose anything as git is a decentralized version controll system, where everybody has the full repository15:36
vmiklos gonzzor: though you have reason, the manpage seem to have somehow missing that tilde15:37
gonzzor vmiklos: Yes.. But I don't have the newest version of git..15:37
vmiklos i can reproduce it with 1.6.1-rc2.something as well15:38
gonzzor Ok..15:38
What should I put in my whitelist if I want --user-path=public_git work for ~100 users? I can get it to work if I manually add ~user1 ~user2 to whitelist... All users are under /home. But /home doesn't work in whiltelist..15:38
vmiklos isn't --export-all a solution for you?15:40
naeu joined15:41
drewr joined15:41
sh12 im trying git rebase, i think it has deleted all my changes15:41
i have done all my changes (2.6.25) in a branch called devel15:41
im sitting in devel right now15:42
i gave a git rebase linux-2.6.28-rc815:42
xlq joined15:42
sh12 i dont see my changes in devel15:42
Ilari pi-meson: If you want to create local branches based on them, one way is 'for i in `git for-each-ref --format=%\(refname\) refs/remotes` ; do git update-ref `echo $i | sed -e s@^refs/remotes/@refs/heads/@g` $i ; done'15:42
sh12 the head is moved to 2.6.28-rc815:42
but without my changes15:42
vmiklos sh12: what was the output from the git rebase command?15:42
pi-meson Ilari: Okay, thank you so much. I think I also need to go and reread the part on branches in my git book again.15:43
sh12 i got fail to merge changes15:43
xlq left15:44
sh12 http://pastebin.ca/128688715:44
jast yeah, you've got conflicts in that rebase that need to be resolved15:45
as a general rule, you tend to get more conflicts with rebase than with merge15:45
edit the conflicted files, git add them and git rebase --continue15:46
the thing you pasted actually explains that15:46
Weiss sh12: did you properly sort out your previous situation, and start from a clean state?15:46
jast some of git's error message are quite helpful... if you read them :)15:46
pigeon left15:46
sh12 yes15:47
i download the git tree allover again15:47
Weiss sh12: muppet check: which branch did you have checked out before doing the rebase?15:47
jast devel15:47
as can be seen from the paste15:47
vmiklos gonzzor: http://article.gmane.org/gmane.comp.version-control.git/10328315:47
Weiss ah, ok15:47
sh12 see i have devel branch which is 2.6.2615:48
i made all the changes to 2.6.2615:48
now git tree moved to 2.6.28-rc815:48
Garito joined15:48
sh12 i want to move my changes to 2.6.28-rc815:48
andrewmaier joined15:48
jast yea, so follow the instructions15:48
Weiss do the conflicts concern files that you modified?15:48
andrewmaier Morning all15:48
pigeon joined15:48
Garito hi!15:48
sh12 no15:49
Garito anyone who can help me to reconstruct a git repository?15:49
try to google without successs15:49
jast Garito, what seems to be the problem? :)15:49
withanx joined15:49
sh12 Weiss, sorry to trouble you, i need to run for a meeting15:49
Weiss no problem15:49
Garito I change my ubuntu15:49
sh12 im sorry to have you guys hanging15:49
Garito and I hope copying the folder will be enought15:49
sh12 i will catch you later/tommorrow15:50
andrewmaier I'm trying to figure out how to *not* track a file. I'm using git to interface with svn and I've cloned the repo. Now I need to change a build.xml file but I don't want to ever commit changes to that file. I've tried dding it to .gitignore to no avail. Any Ideas?15:50
sh12 bye15:50
Garito now I try to commit but don't work15:50
Ilari Garito: Define 'don't work'.15:50
sh12 left15:50
jast andrewmaier, well, the easiest way is to not use git commit -a and never git add that particular file15:50
Garito can't commit anything with qgit (apair in gray)15:50
andrewmaier It's like, please clone this repo, save that one file. Is that possible?15:50
vmiklos andrewmaier: gitignore just controls what git-add adds to the repo, so that won't help for you15:50
andrewmaier Jast: Yeah, sad times.15:50
jast hmm?15:50
andrewmaier Re: "the easiest way is to not use git commit -a and never git add that particular file"15:51
>.<15:51
jast what's the problem with that?15:51
andrewmaier :shrug: Just defeats my normal qorkflow15:51
It's not really a problem per se15:51
Garito any idea?15:51
gonzzor vmiklos: Thanks15:51
jast as long as you don't switch branches there's an alternative15:51
lamont left15:51
jast it's only semi-reliable though, I believe15:51
lamont joined15:51
jast git update-index --assume-unchanged build.xml15:52
Garito jast: this is for me?15:52
jast using stuff like git reset may defeat it15:52
Garito, nope :)15:52
Garito sorry ;)15:52
Ilari Garito: Does regular 'git commit' from commandline work? If not, what errors it prints?15:52
Garito I try, please, wait15:52
andrewmaier I'm going to try git update-index --assume-unchanged build.xml15:52
mbroeker joined15:52
vmiklos see 6259ac6628477aa5ebde9bd9e8daaeecca2a74ae15:52
Gitbot [git 6259ac662]: http://tinyurl.com/5zaxzc -- Documentation: How to ignore local changes in tracked files15:52
cbreak ...15:53
would it not be faster to type the url than the hash? :)15:53
nice_burger joined15:53
andrewmaier Jast: I think that worked wonderfully15:53
Jast: You're my morning hero15:54
jast hooray :)15:54
vmiklos cbreak: not at all, to be honest15:54
andrewmaier Jast: 2 internets for thee.15:54
jast thanks15:54
andrewmaier :)15:54
jast to be on the safe side, check with git status -a before committing to see if it still works15:54
thiago_home left15:55
Garito trying to commit from command line seems to work ok15:57
scientes left15:57
Garito I try to work on it and, if I have any kind of question I will be back here to ask15:57
Thank you so much15:57
and see you!15:57
Garito left15:58
andrewmaier left15:58
pigeon left15:59
reithi left16:00
andrewmaier joined16:00
Beket joined16:02
andrewmaier left16:02
pgollucci left16:04
cgardner left16:04
x_or left16:05
zerok_ joined16:06
zobie joined16:07
nikolasco joined16:08
pigeon joined16:10
rlorandi joined16:12
pi-meson once i've pushed a branch to a remote repository with "git push origin foo" (for branch foo), simply deleting it locally won't delete it from the remote repo, correct?16:12
sujith_h left16:12
Pieter yes16:13
PloenK joined16:13
rubydiamond joined16:15
jackdempsey joined16:16
moconnor joined16:17
marvil07 joined16:17
patrikf joined16:18
HopsNBarley left16:21
zerok left16:22
reel_ left16:24
schlurchz left16:25
aziz left16:26
bieneff joined16:27
lorandi left16:27
willb left16:28
willb1 joined16:28
bieneff left16:29
aziz joined16:29
bieneff joined16:29
rubydiam_ joined16:29
Beket left16:30
stephens joined16:31
bobesponja joined16:31
alexyk joined16:32
willb joined16:33
willb1 left16:33
kanru left16:34
corybantic joined16:35
pi-meson is it possible to restrict "git status" output to a single directory?16:36
moconnor left16:36
metafollic left16:36
vmiklos git status <dir>16:36
lfranchi left16:37
pi-meson vmiklos: I'm not sure that does what i'm looking for; running git status foo from within myrepo/bar/ (where myrepo/bar/foo exists) still shows me other things at the same level of directory hierarchy as foo16:38
macgerhard_ joined16:41
macgerhard left16:41
vmiklos i haven't said 'cd <dir>; git status' but 'git status <dir>'16:41
Pieter vmiklos: that doesn't work16:42
vmiklos: that's the same as git commit --dry-run -- dir16:42
Jacolyte joined16:42
rubydiamond left16:43
arekm joined16:43
vmiklos ok, then i don't see what you want to achieve16:43
gonzzor Why give "git add .", fatal: pathspec '' did not match any files, but git add gives, "Maybe you wanted to say 'git add .'?" Is my git broken?16:43
willb1 joined16:43
arekm if I've commited two patches and I wan't to merge these two into one, do I do rebase or something else?16:43
PerlJam arekm: aye, rebase -i is your friend there.16:43
Pieter vmiklos: something like 'git status | grep ' sub/dir', I think16:44
vmiklos: the pointi s that you want to see what is staged already in those dirs16:44
vmiklos: but not see 'git status' output from other dirs16:45
vmiklos: I don't think that's possible16:45
arekm PerlJam: ok, looking for a howto then :)16:45
mulicheng joined16:46
lfranchi joined16:47
arekm PerlJam: thanks, worked :)16:48
arekm left16:50
kumbayo joined16:51
amystrat joined16:51
altrux joined16:51
amystrat how can I add to my index just a part of a file16:51
alexyk I've looked at all the git guis -- gitk, qgit, gitx on mac -- and they all look the same, letting you see the history. But how do you do add -p with them? what else can you do in these guis?16:51
amystrat ie. lines 10-15, but not 20-2216:51
gilimanjaro left16:52
Pieter alexyk: gitx kan do that16:53
jast git-gui too16:53
Pieter alexyk: and git gui to, by right clicking on the hunks16:53
Voker57 joined16:53
svend__ left16:53
alexyk pieter -- ah, in diff view?16:54
Pieter alexyk: for gitx or git gui?16:54
alexyk gitx16:54
Pieter in gitx, in the commit view, there's a 'stage' button next to each hunk16:54
alexyk ok, thx!16:54
willb left16:57
ceej joined17:03
gilimanjaro joined17:03
advany joined17:03
manithree alexyk: git-cola lets you stage hunks (and I think lines) also17:04
tango_ left17:07
alexyk so what else are these guis good for?\17:07
can you do rebase?17:07
neurodamage oh boy a conflicted merge, how do I rectify this :)?17:07
faithfulgeek left17:09
nbrosnahan left17:10
nbrosnahan joined17:10
kek joined17:11
RayMorgan joined17:11
edwarda__edwardam17:11
ivanoats joined17:11
azizaziz|away17:11
faithfulgeek joined17:11
iulian joined17:12
kevwil joined17:12
florian_bravo joined17:12
bentob0x joined17:15
tvw joined17:16
muthu_ joined17:16
gottesmm joined17:17
bod joined17:17
jast neurodamage, edit the conflicted files, git add them, commit17:18
alexyk neurodamage: git mergetool17:18
pi-meson left17:19
harinath left17:20
pi-meson joined17:21
muthu_ left17:21
gottesmm left17:21
LiamH joined17:22
muthu_ joined17:22
bod I've just checked out a branch (using -b local_branch_name) , made a change and pushed... my change is visible, but of course the repository branch does not reflect the change.17:23
while I can push tags, I can't see how to affect heads in the repository17:23
kevwil left17:24
bod There is --all, but that seems a little more broad-spectrum than I'm after17:24
namenlos left17:25
cgardner joined17:26
supercali joined17:27
supercali left17:27
supercali joined17:28
gilimanjaro left17:28
faithfulgeek left17:28
zjason_ joined17:29
__ash__ left17:31
macgerhard_ left17:32
tango_ joined17:32
manithree left17:33
rubydiam_rubydiamond17:33
zjason left17:34
amystrat left17:34
LeeQ joined17:35
LeeQ Hello git channel... noob here needs help getting started gitting17:35
faithfulgeek joined17:36
zjason joined17:37
__ash__ joined17:37
jast LeeQ, sure, but as long as you don't ask a question don't expect an answer ;)17:37
carllerche joined17:37
patrikf LeeQ: if you have specific questions, ask them :) - otherwise, start with reading the tutorial...17:37
naeu left17:38
aroben joined17:38
LeeQ Sorry, had someone walk in just after I typed that... questions incoming17:38
aziz|awayaziz17:38
sgrimm left17:38
jast bod, what do you mean by "change is visble, but [...] the *repository branch* does not reflect the change"? isn't that sort of contradictory?17:38
LeeQ alright, My current method of deployment for my ROR apps is simply write the code locally, FTP it to my server, and hit refresh in my browser to see how it works...17:39
markkalderon left17:39
__ash__ left17:39
LeeQ I would like to stop being a loser and start doing things the right way17:39
paroneayea is there an equivalent of like, svn cat?17:40
what I'd like to do is17:40
jast paroneayea, git show commit:file17:40
LeeQ so I would like to develop locally (currently windows)and then use version control to move it to my server (linux)17:40
paroneayea jast: aha! thanks!17:40
rtomayko left17:40
paroneayea perfect!17:40
LeeQ will I have a problem going between windows and linux?17:41
Voker57 LeeQ: maybe not. but git is not too easy to install on windows17:41
paroneayea jast: oh, hm17:41
Yuuhi joined17:41
paroneayea does that only show the diff?17:41
I want to show the whole file at that revision17:41
jast leave out the ":file" and you get the commit diff. include it and you get the full file.17:41
coldwaterlover joined17:41
Voker57 LeeQ: didn't you install it already?17:42
LeeQ no sir17:42
I have done nothing yet17:42
Voker57 look here then http://www.google.com/url?sa=U&start=1&q=http://code.google.com/p/msysgit/&ei=aOhHSdmLBYbq0ASoqMDRDQ&sig2=WS9_2WU1o9UCRjGxmqu9YQ&usg=AFQjCNEYfLwmX-yP7p3gqngH4d8HehqTPw17:42
jast LeeQ, just make sure core.autocrlf (see man git-config) is enabled on the windows system, otherwise you may get mixed line endings17:42
Gitbot LeeQ: the git-config manpage can be found at http://git.or.cz/man/git-config17:42
paroneayea jast: aha :)17:42
awesome.17:42
jast one of msysgit and cygwin git has it enabled by default, i don't recall which one17:42
Voker57 fuck, google is poisoning urls17:42
jast Voker57, only if you're logged in :}17:42
that's just because Google wants all your data, so don't worry17:43
paroneayea also only tracks you if you're logged in... all the more reason not to log in! :)17:43
Voker57 jast: so this line has my password? :017:43
jast session data, perhaps17:43
zjason_ left17:43
jast it's probably secured in some additional way17:43
paroneayea it doesn't have your password.17:43
gitte left17:43
paroneayea actually, the customizegoogle extension for firefox is pretty nice.17:43
powerfox joined17:44
Voker57 logs off17:44
Voker57 nah, url's the same17:44
jast you can login but you can't ever logout completely ;)17:45
(just guessing)17:45
TwoPixelGrid joined17:45
powerfox Hi there. Is there anyway to join some commits in the repo?17:45
I can create another branch from Com1, then merge it with Com3 with squash to join Com2 and Com3 to new merge commit. But it painful.17:45
calin left17:46
gonzzor left17:46
Voker57 ok i erased cookies and urls are nice17:46
also banned them17:46
PerlJam powerfox: git rebase -i ?17:46
naeu joined17:47
aspotashev joined17:47
corybantic_ joined17:48
bod jast: I checked out origin/t using -b t ...I now hove .git/refs/heads/t which is the same as .git/refs/remotes/origin/t17:48
jast: I then made my change, commited, tagged and pushed with --tags17:49
faithfulgeek left17:49
jast and the tag got updated but the branch didn't?17:50
bod jast: so now, .git/refs/heads/t is no longer the same as .git/refs/remotes/origin/t. which is unchanged17:50
powerfox PerlJam: thanks, that is what I need. Didn't know rebase can do such cool things :)17:51
jast push doesn't automatically update the remote tracking branches, try a git fetch17:51
bod although the chnages, and the tag which are in the repository17:51
CodeOfficer joined17:51
bod OK17:51
snitko joined17:51
bod pdating local tracking ref '...'17:54
that seems to have done the trick, thanks17:54
pi-meson is it possible to select a subset of files from branch X commit Y and merge them with branch Z?17:55
sping left17:56
TwoPixelGrid Hi all. First time in channel. Q: Is anyone using git for version controlling things other than source code? i.e would it be a suitable platform for version controlling media-heavy projects? I produce audio and trying to figure out how to bring version control into that world. Right now I'm stuck save-as-renaming song iterations etc...17:56
corybantic left17:56
mithraic joined17:56
offby1 I suspect it'll -work-, but not very well.17:57
The reason is: you can't really merge non-textual stuff17:57
and since one of git's big selling points is ease of merging ...17:57
you'd wind up not taking advantage of that selling point.17:57
bod left17:58
cnk yes - but is there a better alternative? I don't know of anything that can identify the differences in big blobs of binary content17:58
offby1 beats me.17:59
pasky offby1: yes, i don't think git is _worse_ than anything else17:59
cnk git is certainly better than versioning by renaming17:59
offby1 yeah, certainly no other revision control system that I know of will do any better.17:59
Perhaps zillion-dollar proprietary systems like ClearCase would, but something tells me you're not considering them.17:59
cnk TwoPixelGrid: there is a git example of using it to manage binary content - I think it is in the Peepcode PDF, but am not 100% sure that's where I saw it18:00
muthu_ left18:00
pasky git is still probably better than many others18:00
since you can define custom merge drivers for particular files18:00
TwoPixelGrid cool thx..ill check it out..18:00
pasky so if you have a tool that can merge doc files or whatever...18:00
cnk one selling point for git is that it would help you id corruption of the binary files18:00
TwoPixelGrid cnk : the only other direction i know to look is in the 'content management' world - i.e. AlienBrain -- used by game/movie production pipelines18:01
cnk (assuming what you checked in was OK, that is)18:01
that is probably worth looking at - but I don't know enough about that realm to comment18:01
jmesnil left18:02
cnk certainly they are trying to solve the same problem you are18:02
TwoPixelGrid http://www.alienbrain.com/ fyi18:02
yeah..the audio production world has no concept of version control.. so we resort to convoluted file/folder structures etc..18:03
naeu left18:04
cannonball left18:04
slainer68 left18:05
ahupp|fb joined18:06
neurodamage left18:06
gilimanjaro joined18:07
faithfulgeek joined18:07
smitty519 joined18:07
smitty519 left18:08
markelikalderon joined18:10
gilimanjaro left18:11
EmilMedve left18:11
cannonball joined18:11
dreiss joined18:12
bugfux joined18:13
EmilMedve joined18:14
bugfux left18:18
metajack left18:19
metajack joined18:19
gilimanjaro joined18:20
unreal left18:20
oudeis_ left18:21
oudeis_ joined18:21
joydivider joined18:21
thiago_home joined18:28
svend joined18:28
drizzd_ joined18:29
faithfulgeek left18:29
SoopmaLuva84 i am having some issues getting gitweb to function properly18:30
i seems to be ignoring my owner files18:30
sgrimm joined18:30
SoopmaLuva84 and base_url18:30
i cant seem to enable snapshot support either18:31
rtomayko joined18:32
SoopmaLuva84 any ideas how to fix this?18:33
naeu joined18:33
rolfb left18:35
Yuuhi left18:36
faithfulgeek joined18:36
webmat left18:38
ijcd left18:38
SgtPepperKSU joined18:40
SgtPepperKSU left18:40
naeu left18:43
drizzd left18:45
ahupp|fb left18:47
alexyk left18:50
zobie left18:52
Ratler left18:52
Ratler joined18:52
marvil07 left18:54
EmilMedve left18:54
seed__ joined18:56
alexyk joined18:56
EmilMedve joined18:57
seed__ Hi, I have my branch master and a branch dev , I just pull from origin into master, and I would like to apply changes on my dev branch is there a better way to do this than pulling origin from dev?18:57
mulicheng seed__: on the dev branch, won't "git merge master" work?18:57
kevlarman probably rebase makes more sense18:58
SgtPepperKSU joined18:58
hobodave joined18:58
seed__ mulicheng: does merge delete one of the both branches afterward?18:58
flaguy joined18:59
Ilari seed__: Nope, merge doesn't delete branches...18:59
ivanoats left19:00
mulicheng seed__: yeah, you still have both branches there, just that after the merge, your dev branch contains the changes made on master after you created the branch.19:00
rebase can work just fine too.19:00
berndj joined19:01
david_koontz joined19:02
seed__ yes merge worked welll :), any way i'll take a look at git rebase :)19:02
jast generally I wouldn't recommend rebase19:02
alexyk left19:02
SgtPepperKSU I have what is hopefully a simple question: I have two branches, BranchA and BranchB, that have merged a third branch, BranchC. BranchA later reverts the merge of BranchC as those changes aren't needed. Now, how can BranchB merge BranchA without it automatically reverting the merge of BranchC (which is what I'm seeing happen)?19:02
So I want BranchB to effectively have merged BranchA and BranchC.19:03
But, whenever it merges BranchA, BranchC's changes go away.19:03
I understand why it is happening (it is replaying the revert from BranchA), but I was wondering how I can get around this.19:04
seed__ git told me my change could be fast forward so should I assume I won't get any trouble by using rebase ?19:04
SgtPepperKSU If I try to redo the merge of BranchC, it says it is already up-to-date19:04
berndj SgtPepperKSU, can you use git-merge --ours [blah blah]?19:04
seed__ jast: why don't you recommend rebase?19:05
SgtPepperKSU when I merge A into B?19:05
unreal joined19:06
OlofS joined19:06
berndj left19:06
bryanl_ joined19:07
bryanl_ left19:08
jast seed__, it tends to cause more conflicts. generally I'd only recommend rebase if a) you want to make your history "prettier" or b) you have to use git-svn19:09
florian_bravo left19:10
alexyk joined19:10
seed__ jast: ok19:11
SgtPepperKSU berndj, --ours doesn't appear to be a valid option for git-merge19:11
bryanl_ joined19:11
Ilari SgtPepperKSU: '-s ours'?19:12
SgtPepperKSU right, just realized that. Will try19:12
kevlarman is there an easier way to get a YYYYMMddhhmm date than piping git show into grep and sed?19:13
docwhat joined19:14
alexyk left19:16
ahupp|fb joined19:18
willb1 left19:19
SgtPepperKSU using '-s ours' I don't even pick up the changes from BranchA19:19
nud left19:19
nud joined19:19
PhilK joined19:19
Sigma joined19:20
jast kevlarman, exactly the date or is a bit of additional info okay too?19:20
kevlarman just the date19:20
ivanz left19:21
jast --pretty=format:%aD (or %ai, depending on what format you want)19:21
kevlarman %ai is closer19:21
since it's going into a filename i'd prefer to keep the spaces and weird characters out19:22
QBall joined19:22
QBall every time I want to push to a remote git repo (initial import) I get this error: error: unable to create temporary sha1 filename ./objects/45: Permission denied19:23
the permission of that file is! correct19:23
bryanl left19:23
snorkel joined19:23
timonator QBall: on the remote side?19:23
or locally?19:24
kevlarman i guess i'm stuck with sed19:24
powerfox left19:24
QBall locally19:24
pushing to repo.or.cz19:24
I just made19:24
I had this before, then I got around it, but can't remember how19:24
timonator oh, strange. repo.or.cz would hardly have a problem with permissions19:24
QBall every time it happens19:24
Ravatar- left19:24
QBall timonator: full output git push pushrepo masterCounting objects: 8, done.19:25
Compressing objects: 100% (7/7), done.19:25
Writing objects: 100% (8/8), 6.07 KiB, done.19:25
Total 8 (delta 0), reused 0 (delta 0)19:25
error: unable to create temporary sha1 filename ./objects/45: Permission denied19:25
Ilari QBall: If its just made: 1) Did you add your user as authorized to push? 2) Wait a bit, there seems to be some cronjob involved...19:25
SoopmaLuva84 can someone help me with gitweb19:25
QBall fatal: failed to write object19:25
error: unpack failed: unpacker exited with error code19:25
To ssh://repo.or.cz/srv/git/gmpc-discogs.git ! [remote rejected] master -> master (n/a (unpacker error))19:25
error: failed to push some refs to 'ssh://repo.or.cz/srv/git/gmpc-discogs.git'19:25
aaah19:25
shit19:25
http://mpd.pastebin.ca/128701919:25
wrong clipboard19:25
sorry19:25
timonator heh19:25
QBall :(19:26
alexyk joined19:26
QBall ctrl-c and middle mouse button19:26
this is getting me so pissed off19:26
the error is frigging idiocity19:26
timonator so never use ctrl-c?19:26
QBall ctrl-v I ment.. a well19:26
how am I gonna fish this pushing error19:27
timonator it appears from the log, that the remote side outputs the error19:27
especially since it speaks about an "unpacker"19:27
Ilari QBall: Firstly, have you authorized any user to push to remote repo? AFAIK, by default nobody is authorized (not even project admins).19:28
QBall damn19:28
QBall grabs a gun19:28
QBall shoots himself19:28
timonator that's kinda contraproductive, man19:29
QBall so is the error message19:29
alexyk left19:29
rtomayko left19:31
ijcd joined19:31
oudeis_ left19:32
ijcd left19:32
snorkel I've been using this command to add untracked files to the index...19:32
git ls-files --exclude-standard -o | git update-index --add --stdin19:32
Is there a shorter way?19:32
Ilari QBall: That kind of errors from repo.or.cz either indicate that user is not authorized to push, or the authorization has not yet propagated to actual repo...19:32
ijcd joined19:32
willb joined19:33
timonator snorkel: does it have to ignore files already under revision control?19:33
Ilari snorkel: 'git add .'?19:33
timonator Ilari: that will also add changes in already controlled files19:33
Ilari Yeah. Oops.19:33
timonator of course... you could do:19:33
git stash ; git add . ; git stash apply19:33
QBall Ilari: now I know19:33
timonator while not dramatically shorter, it's less complex... missing all the switches and all19:33
QBall an object/45 permission error is vague19:33
SgtPepperKSU So, from the lack of further response, I take it I'll have to due a rebase -i to get rid of the merge altogether, along with all the nastiness that comes along with rebasing a pushed branch?19:34
snorkel timonator: that might be more pleasant to use19:34
jast QBall, well, it's difficult for git to figure out what causes the problem, that's why19:35
it basically just means that for some reason or another, the directory can't be written to19:35
Ilari IMO, the new error message (in later versions) is even worse.19:36
QBall jast: stop haunting me :D19:36
jast: didn't realize it19:36
jast QBall, bah, I've been here for months, continuously19:36
:)19:36
timonator Ilari: what does the new one say?19:36
mw-home joined19:37
jast SgtPepperKSU, one other course of action I can think of right now is to do something other than merging to bring over the history from that other branch, though of course that will destroy further chances of merging the two branches properly19:38
ahupp|fb_ joined19:39
danopia_danopia19:39
jast hmm, I think the hook scripts of repo.or.cz might be improvable to give a clearer error message19:39
snorkel_cs joined19:39
jast I'll look into that, perhaps19:39
snorkel left19:40
jast but first I'll go get something to eat19:40
dominikh joined19:41
Ratler_ joined19:41
Ilari timonator: Well, newest versions have seemingly yet again reworded those errors...19:41
noob2000 joined19:41
snorkel_cs timonator: stashing; adding ;applying is slower ... I guess I can add an alias for the long command...right?19:42
LeeQ left19:42
noob2000 Hi, I have a local repository, which has been cloned from a remote one, but does not have remote tracking branches. Is there any way I can tell the latest shared commit with that repository (without fetching first)?19:42
snitko left19:43
snitko joined19:43
timonator snorkel_cs: i guess, yeah19:43
marceloFFighter19:44
timonator snorkel_cs: maybe more like this:19:44
jast noob2000, look at git peek-remote, perhaps19:44
timonator git diff > patch ; patch -R < patch ; git add . ; patch < patch19:44
no, wait19:44
that won't clean the index19:44
anyway, whatever floats your boat...19:45
jast what was the goal here?19:45
adding untracked files and nothing else?19:45
timonator right19:45
Ilari noob2000: Well, at least fetch shouldn't transfer the shared part...19:45
snitko left19:45
snorkel_cs jast: shorter command line for .. git ls-files --exclude-standard -o | git update-index --add --stdin19:46
noob2000 Ilari: I cannot perform fetch, from various reasons19:46
jast: peek-remote is the old version of ls-remote19:46
timonator noob2000: maybe you can gather the info from git reflog?19:46
jast why do you need a shorter command?19:46
timonator it won't of course tell you the right data, if the remote one pulled from you in the mean time...19:47
jast anyway, a slightly shorter version is to use "| xargs git add" at the end19:47
and now I really have to go19:47
timonator bye jast!19:47
pygi left19:47
rootPosixXombie joined19:48
noob2000 timonator: I hope I get what you're trying to do right, but what about git-ls-files -o?19:48
nice_burger left19:48
snorkel_cs noob2000: that doesn't use ignore/exclude19:48
Ilari noob2000: Look for first commit in 'git log' that doesn't have you as committer?19:48
timonator noob2000: don't know19:49
noob2000 ok19:49
thanks19:49
noob2000 left19:49
rootPosixXombie git log of a certain file shows that there were many commits: commit1, commit2 , commit3. I want to see the file before commit 3 was done. How can I do it?19:49
timonator git checkout it?19:49
snorkel_cssnorkel19:50
DrNick assuming commit2 is commit3's predecessor, git show commit2:path/to/file19:50
timonator watch out for changes you made between commits19:50
that's way more elegant19:50
rootPosixXombie timonator, these is not my commits19:51
I am talking about existing kernel git tree19:51
Ratler left19:52
ahupp|fb left19:52
bryanl_ left19:53
peeja joined19:53
SgtPepperKSU left19:53
timonator just use what DrNick told you and you'll be fine19:53
hobodave hey guys19:53
I've made changes in my working copy, that I want to move to a separate branch, how do I do that?19:54
I don't want to commit them to master (my current branch)19:54
rootPosixXombie timonator, that does not work19:54
git show commitNUm simply show the change19:54
oudeis joined19:54
rootPosixXombie I want to see all the file19:54
as it was before commit1, commit2, commit 3, ........ comit N were done19:55
is there a way?19:55
timonator did you add :path/to/file, too?19:55
zjason_ joined19:56
timonator sure works for me.19:56
snorkel hobodave: git checkout -b NewBranch ... somebody correct me if I'm wrong19:56
rootPosixXombie it gives an error19:57
hobodave that preserves my working copy?19:57
I have a ton of changes I can't afford to lose19:57
timonator rootPosixXombie: can you no-paste that error?19:57
rootPosixXombie git show d34f3015c5f:a.a19:57
or fatal: ambiguous argument ':a.a':19:57
snorkel hobodave: hang on one sec19:57
timonator that's certainly strange; a.a is a regular file?19:58
wereHamster hobodave: commit the changes, then git checkout -b newbranch; then go back to the original branch with git checkout master; and remove the commit with 'git reset --hard HEAD~1'19:58
(assuming the original branch was indeed 'master' ...)19:59
Ilari hobodave: 'git checkout -b newbranch' does not overwrite uncommitted modifications.19:59
rootPosixXombie timonator, ok, this was my mistake19:59
I though to create a file a.a19:59
statim_ left19:59
rootPosixXombie it works - shows the file on screen19:59
can I redirect it to lets say a file named a.a19:59
?19:59
snorkel hobodave: i just tested git checkout -b newbranch and it worked fine20:00
timonator rootPosixXombie: yeah, with > a.a20:00
rootPosixXombie thnks20:00
great20:00
works20:00
snorkel hobodave: you can also zip up your changes before that if you want to be extra safe...20:03
advany left20:03
jast no need to20:03
bryanl joined20:03
jast checkout -b foo doesn't change anything20:03
except HEAD, of course :)20:04
snorkel jast: trust no one...especially version control :)20:04
jast I know pretty well what to expect from common git commands20:05
snorkel jast: until some exception happens20:05
jast you don't *have to* trust me, of course20:06
feel free to do a bit of superfluous backup stuff if you don't20:06
snorkel jast: hobodave said he had a ton of changes that he didn't want to lose so i was merely suggesting that he could also zip them if it made him feel better20:07
hobodave heh20:07
snorkel: does git provide a method to do that?20:07
jast for committed stuff, yes20:07
timonator git diff > mychanges for uncommited stuff20:07
snorkel hobodave: what platform are you on?20:07
jast git diff won't include untracked files, of course20:07
timonator of course not20:08
jast but untracked files are left alone by virtually all commands anyway20:08
just like checkout -b leaves alone all files in the working tree ;)20:08
timonator what about a pull that pulls the creation of a file that locally exists as untracked? it will say "merge failed" or something, right?20:08
jast it will not even start merging20:08
it will say "untracked file would be overwritten by merge" and abort20:08
ajonat joined20:09
timonator nice20:09
zjason left20:09
hobodave snorkel: osx20:10
rootPosixXombie now, a difficult question: how can I now which commit changes a certain file ?20:10
hobodave I can figure that out though20:10
git diff20:10
rootPosixXombie a certain field20:10
hobodave I'm not totally clueless :)20:10
just was nervous that I had over a thousand lins of changes w/ no commit (bad me)20:10
timonator a certain... field?20:10
mcella left20:10
rootPosixXombie I know for sure that there was a change in a filed named y20:10
I mean:20:10
it was20:10
varA.interval20:11
and now it is varB.interval20:11
there were many many many commits20:11
between when it was varB.interval20:11
timonator i believe you can use pickaxe for that kind of thing20:11
rootPosixXombie what is this20:11
pickaxe?20:11
mdt joined20:11
doener git log -SvarB.interval20:12
mdt Hi everyone20:12
rootPosixXombie doener, trying...20:12
snorkel hobodave: i use cygwin and use something like 'tar jcvf changes.tar.bz2 -T <(git ls-files -m)20:13
edwardamedwardam_lunch20:13
snorkel hobodave: or 'git diff --name-only HEAD^' for the files in the last commit20:13
k776 joined20:13
solydzajs joined20:14
peeja how might I search for a file/directory by name across a number of branches?20:16
mdt I would like to change git-gui to be able to, while standing on a superproject, see, commit and push, changes on every submodule. So automatically a commit about a single bug resolution that modified several files on different submodules gets done on each one and the superproject as well. Anybody interested on giving me a hand?20:17
snorkel claps20:17
snorkel mdt: sorry couldn't resist :)20:17
mdt :(20:18
did I said something stupid? :S20:18
jast no, someone's in a punny mood, that's all20:18
snorkel jast: ha!20:18
mdt :P20:18
LeeQ joined20:19
mdt so, is there a way already to do what I want? or will I have to go into the git-gui sourcecode?20:19
jast probably the latter20:20
rlorandi left20:20
ijcd_ joined20:21
mdt I was afraid about that20:21
jast: do you think anyone else would be interested on having that feature?20:22
jast I wouldn't. I'm too interested in having meaningful commit messages in all repositories.20:22
hurikhan|Work left20:23
mdt But what do you do if you fix a bug that requires to touch at least tow files on different submodules?20:23
j_engelh tows mdt away20:23
jast i commit the changes and update the gitlinks20:24
foutrelis left20:24
mdt but you have to make the commit on each submodule, repating the msg and do it again on the superproject if you want to update the submodule reference?20:25
ahupp|fb_ left20:25
jast why would I repeat the message?20:25
I would write different messages that are relevant for each repository20:26
tpiep joined20:26
statim joined20:26
mdt you would repeat the message if the change made on each repository is about the same thing.20:27
plediii joined20:27
sstangl left20:27
mdt if two submodules communicate between. And you want to change the communication interfeace between them, you would have to make changes on both submodules, and the git message would be the same.20:29
jast because I tend to explain the changes20:29
and it's quite unlikely you have to make exactly the same change in each submodule to fix the bug20:29
yann joined20:29
mdt hm, don't know why I need it so often then =(20:30
calin joined20:31
mdt I have two submodules very connected between each other, and I often need to commit the same message like "Fixing bug #123, changing blabla" on both of them _and_ the superproject.20:31
ahupp|fb joined20:32
robinr joined20:32
_graham_ joined20:32
ijcd left20:37
mdt anyway, thanks for the help20:38
mdt left20:40
solydzajs_ left20:40
Darkhost joined20:42
Darkhost http://imperiumreklamy.com/pages/ptp.php?refid=krzysztof9222<---- Look at this!!20:42
aspotashev left20:42
plediii_ left20:42
Darkhost left20:43
rootPosixXombie left20:43
greyface joined20:44
plediii left20:44
snorkel left20:45
xyzzy joined20:46
greyface I'm trying to figure out this git thing, but it turns out that after a couple git resets, my local dir is empty of my source ;/20:46
geckosenator joined20:48
geckosenator if I type git checkout"20:48
and I get M file120:48
bobmcw left20:48
geckosenator and a bunch of files with M before them20:49
what is that supposed to mean?20:49
jast it means you have uncommitted changes in those files and they got carried across the checkout20:49
geckosenator oh20:49
jast in checkout without an argument it just means uncommitted changes :)20:49
geckosenator but if I specifically checkout the directory they are in, it undoes the changes20:49
jast checkout with a path specified works differently from the version without20:50
geckosenator ok20:50
greyface How can I reset my local git repo to how it was in the very beginning?20:51
dwmw2 left20:51
geckosenator greyface: that's what I think I want to do :-P20:51
damog greyface: git reset 00hard20:52
greyface: git reset --hard20:52
jast --hard :)20:52
greyface my local dir is still empty ;/20:52
jast did you actually ever commit anything? what is the "very beginning" you spoke of?20:53
greyface jast: yea I commited to github20:53
very beginning being before I installed git20:53
damog lol20:54
geckosenator heh20:54
jast so you want to throw away all of your repositories? just delete them.20:54
greyface nono20:54
QBall lol.20:54
greyface I want to recover my files20:54
jast anything you didn't commit that is now gone is gone for good.20:54
Ilari greyface: Does newest commit contain anything (git ls-tree HEAD)?20:55
greyface that didnt return anything20:55
QBall uwh owh20:55
greyface thing is, I never deleted those files20:55
they deleted when I did a reset20:56
jast well, there are quite a few commands that remove stuff, and that are explicitly documented as doing such20:56
so does the repository on github look like what you want?20:56
rubydiamond left20:56
greyface well, at least it has most of the files20:57
lol20:57
pjhyett joined20:57
jast how did you start out? by cloning from github?20:57
snorkel joined20:57
greyface no I had a local project20:57
and I pushed it20:58
added all my local files to git, pushed it, was working fine20:58
jast okay, let's first see of there are any local remains. what does "git ls-remote ." output?20:58
greyface e7aef9df053077fe1549f74034f99c515cd8a5c6 HEAD20:59
and 2 more lines20:59
e7aef9df053077fe1549f74034f99c515cd8a5c6 refs/heads/master20:59
1709e5078b221adc08f8a07614d6aa3caec18311 refs/remotes/origin/master20:59
jast okay20:59
and the output of "git show HEAD:" is empty?21:00
Ilari greyface: 'git ls-tree origin/master'. Does it show anything?21:00
jast if so, what about "git show HEAD^:"?21:00
greyface ok so21:00
first one is empty21:00
2nd one has my files21:00
jast 2nd being Ilari's or mine?21:01
greyface git show HEAD; is empty21:01
git ls-tree orig... is full21:01
and HEAD^ returns an error21:02
jast what error?21:02
greyface unknown revision21:02
jast hmm, interesting21:02
greyface ambiguous argument 'HEAD^': unknown revision or path not in the working tree21:02
jast you must have accidentally done something rather funky to get into this situation21:02
greyface lol21:02
what I did is21:02
jast the quick fix is git reset --hard origin/master21:02
greyface git reset --hard HEAD^21:02
a bunch of times21:03
xyzzy hahahhaa21:03
i did that too once21:03
jast oh, so you removed all commits, one by one21:03
greyface lol >_>21:03
yea21:03
I wanted to go back to the inital state21:03
timonator not removed, per se...21:03
jast the very first initial state is "nothing" :)21:03
greyface LOL21:03
nice21:03
xyzzy luckily i had the original HEAD's sha1 written down on paper21:03
vbabiy joined21:03
timonator LOL :D21:03
the whole sha1?21:03
jast UI21:04
erm21:04
I accidentally the whole sha1!21:04
Ilari greyface: Maybe look at 'git reflog' to see if there's more stuff recoverable...21:04
timonator apparently you also accidentally the verb!21:04
greyface ok so I did git reset --hard origin/master21:04
jast quite true. it's an internet meme.21:04
greyface now I gotta pull it right21:04
timonator yeah, i thought that was the memonic response21:04
greyface oh no21:05
it's back already21:05
lol21:05
edwardam_lunchedwardam21:05
greyface ok awsome jast21:06
jast for the future, if you want to go back to some time way in the past, find the right commit and use its sha1 with git reset21:06
greyface ok :)21:06
almost had a panic attack21:06
lol21:06
jast that will save you lots of steps too21:07
and perhaps don't reset away that many commits if you've already published them, depending on what you're trying to do21:07
greyface I was trying to remove files from git21:07
with git -rm, but it removed the actual files21:07
Ramblurr left21:07
greyface thats when i tried to go back21:07
jast rewriting history tends to give other people who've got a copy of the repo headaches21:07
you can always undo changes to individual files21:07
in this case, git checkout HEAD -- file would have done the trick21:08
greyface right21:08
jast also, for the future, git rm --cached untracks files without physically deleting them21:08
greyface but how do I remove a file from git21:08
without deleting the file21:08
ah21:08
jast cool, I answered your question faster than you asked it ;)21:08
greyface yea lol21:08
ankit9 joined21:09
Beket joined21:09
jast to keep you from panicking in the future: it's actually very hard to lose committed stuff you lost rather recently unless you use certain cleanup commands21:10
geckosenator left21:11
rtomayko joined21:11
greyface aha yea I thought it was pretty safe I just found it surprising that it went back to a version which didn't actually exist in my versionning system21:12
unreal left21:12
jast yeah, I didn't know either that reset would step past the very first commit, and I don't quite understand how it can do so21:12
but let's not worry about that since we've got things fixed anyway21:13
greyface yea, thanks for the help!21:13
drewr left21:13
jast you're welcome21:13
Ilari I'd say that the first version is probably empty. Reset can't step past the intial version.21:13
EmilMedve left21:13
greyface yea21:13
jast yeah, quite possible, I just didn't think it were based on the descriptions21:14
Ilari Since reset always requires valid commit ID to write as "branch pointer". And state behind initial commit has no branch pointer value.21:14
jast that's what had me puzzled21:14
greyface yea me 2 even21:14
lol21:14
dwmw2 joined21:14
Ilari greyface: What does 'git rev-parse e7aef9df053077fe1549f74034f99c515cd8a5c6^{tree}' print?21:15
greyface *maybe* I did a commit before adding any files21:15
but I dont even remember21:15
543b9bebdc6bd5c4b22136034a95dd097a57d3dd21:15
jast you can now look at the history and find out :)21:16
greyface howdidothat?21:16
unreal joined21:16
jast i think the most intuitive way is to use gitk21:16
or one of the other GUI viewer tools21:16
greyface oh21:17
ok im in there...21:17
Ilari greyface: Hmm... That doesn't seem to be the empty tree... Puzzled...21:17
netoman left21:17
pjhyett left21:17
greyface ah theres a first commit21:17
before my first proper commit21:17
and its empty21:17
oh21:18
yea I remember now21:18
coldwaterlover left21:19
rem7 joined21:19
solydzajs left21:19
oudeis left21:19
greyface Ilari, are you viewing my git repo?21:19
j_engelh "Are you vieweing my git repo? Are you, punk? That's mine! Hear me? Mine!"21:20
greyface lol21:20
chris2 joined21:21
bentob0x left21:23
esdentem joined21:24
rem7 what does it mean when a file changed mode? I'm pretty sure I didn't modified any files in my repo, but I did put it in my USB, and when I copied it in another machine, git status showed that all my files had changed. so when I did a commit it said files changed mode from 100644 -- 100755...21:24
rtomayko left21:25
rem7 does that have to do with permissions, users?21:25
esden left21:25
xyzzy you probably mounted your usb memory stick with different umask21:25
marcan left21:25
timonator permissions only21:25
doener rem7: usb stick -> likely FAT fs -> no unix permissions21:25
ajonat left21:25
marcan joined21:26
snorkel left21:26
esdentemesden21:26
rem7 is there a way to ignore permission changes?21:26
doener core.filemode or so, check the git config man page21:26
rem7 thanks21:26
OlofS left21:26
doener but I'd just fix up the permissions...21:26
rem7 how so? like, chmod the file the same way in both machines before doing anything?21:27
j_engelh more like, copy the file with proper permissions in the first place21:27
ricky left21:29
tvw left21:31
rtomayko joined21:32
bobmcw joined21:32
rem7 left21:33
patrikf left21:33
yann left21:35
OlofS joined21:36
HttpErrors joined21:36
docwhat left21:37
kukks joined21:38
drewr joined21:39
oudeis joined21:40
vbabiy left21:41
Weaselweb left21:44
bugfux joined21:45
snitko joined21:52
Acryler left21:53
OlofS left21:54
thiago_h1me joined21:54
nikolasco left21:54
parasti joined21:55
Varon left21:57
wereHamster is there a git command to check whether `pwd` is a git repository? Something to replace an 'if [ -d .svn ]; then' test to generate a version string22:01
livinded joined22:01
PhilK left22:01
pi-meson left22:01
livinded do all branches in a git repo share untracked files?22:01
rtomayko left22:01
rtomayko joined22:02
Ilari livinded: Index and working tree (including untracked files) is shared by all branches. But of course files that are untracked in one branch might not be untracked in another...22:03
livinded I branched master to create a new branch, added some files, didn't commit, checked out master, and the files were still there22:03
is that supposed to happen or is something wrong?22:04
bobmcw left22:04
Arjen That's normal22:04
livinded now if I commit in my new branch and then checkout master again will they be there?22:05
Arjen No22:06
thiago_home left22:06
biv_afkbrain_in_vat22:07
livinded alright, I thought something weird was going on, but that makes sense22:08
kumbayo left22:11
thiago_home joined22:14
cbrakecbrake_away22:15
seanius left22:15
lucsky left22:18
faithfulgeekfakefowlduck22:18
fakefowlduckfaithfulgeek22:18
bryanl left22:19
ben_h joined22:19
faithfulgeek left22:20
faithfulgeek joined22:22
seanius joined22:22
marcot joined22:25
__name__ joined22:25
mw-home left22:25
marcot Hello, how do I get a list of all unreferenced commits?22:25
greyfacegreyface|away22:25
pygi joined22:26
marcot I just have a branch, and a commit is not being shown on git log, cause it's not referenced by HEAD. But when I do git log abc1 it's shown.22:26
daxelrod joined22:27
Pieter you can't do that in any easy way22:27
gilimanjaro left22:27
vmiklos git prune -n -v?22:27
Pieter easiest is probably to have another branch point to it22:27
and then use git log --all22:27
Ilari marcot: 'git reflog' and 'git fsck --full'?22:28
thiago_h1me left22:28
SoopmaLuva84 left22:28
nud left22:29
xyzzyberndj22:30
marcot vmiklos: There's no -v option here for git-prune. Maybe it's cause I'm using version 1.5.6.5.22:30
Ilari: I think git fsck --full is what I want, thanks.22:31
Ilari: Or just git fsck is giving the same result.22:31
vmiklos marcot: ah, -v is not necessary.22:31
-n itself will print out the necessary info as well22:31
daxelrod left22:31
marcot vmiklos: oh, yes, it gave me more things than git fsck22:32
daxelrod joined22:32
michaelboutros joined22:32
daxelrod left22:33
michaelboutros hello.22:33
vmiklos probably you need something like 'git prune -n --expire now|grep commit$', but you'll figure that out22:33
michaelboutros I have, for example, cloned a repo from Github22:33
to get updates, should i use git-fetch or git-pull? they seem to do the same thing...22:33
name left22:33
jast git pull actually means git fetch followed by git merge <the remote branch>22:34
marcot Hum, none of them gave me what I want...22:34
jast so git fetch doesn't update your local branch22:34
marcot I couldn't git log on any of the results.22:34
svend_ joined22:34
marcot So I couldn't get to the commit I tested earlier.22:34
vmiklos are you sure the commit is not in any reflog?22:35
marcot There was no commit..22:35
vmiklos then you won't see it as a commit22:35
marcot It's in reflog22:35
agenteo joined22:35
michaelboutros jastL so git pull would be the way to go?22:35
vmiklos try git log -g22:35
-g reads from the reflog22:36
jast michaelboutros, generally yes. git fetch has the advantage that you can review the changes on each side (using, for example, git log master...origin/master) before merging22:38
but you don't really always need to do that22:38
michaelboutros ah, thanks a lot then :)22:38
yeah, git pull would do what i need22:38
thanks!22:38
michaelboutros left22:38
marcot vmiklos: git log -g gives me the commit, but how can I filter only the unreferenced ones?22:38
berndj left22:38
gottesmm joined22:39
faithfulgeek left22:39
xyzzy joined22:39
TwoPixelGrid left22:41
vmiklos marcot: if you see the commit _only_ in the reflog, then git prune --expire now -n should find it as well22:42
fg3 joined22:42
xyzzyberndj22:42
boto left22:42
deskinmdeskinm_away22:42
fg3 can git import a perforce repo?22:42
vmiklos (you can also try git branch -a --contains <hash> to see which branch has a reference to it, if git prune does not list the commit)22:43
Beket left22:43
marcot vmiklos: It's not finding, it. git prune --expire now -n | grep commit returns me nothing.22:43
vmiklos then probably it's referenced22:43
marcot I just have a branch.22:44
vmiklos try the git branch -a --contains trick22:44
<HEAD:contrib/p4import/README>22:44
Gitbot [git README]: http://tinyurl.com/59buua [blob]22:44
vmiklos fg3: ^ have you read this one?22:44
kukks left22:44
marcot vmiklos: git -a --contains abc1 returns me nothing.22:44
mcella joined22:44
marcot vmiklos: but it's in git log -g22:44
I'll do a shell script.22:44
gottesmm left22:45
jbwiv joined22:45
svend left22:45
vmiklos marcot: strange, the documentation does not talk about git-prune respecting reflogs.22:46
jbwiv guys, I have a remote branch I'm trying to checkout and modify, so that I can push it back. I'm trying to understand the proper way of doing this. This remote branch lags behind the local master. Is the proper way to do this: $ git branch -b my1_5; git pull origin origin/v1_5 ?22:46
marcot vmiklos: maybe it's a bug then.22:46
vmiklos marcot: does git fsck --unreachable|grep commit gives you anything?22:46
bugfux_ joined22:47
marcot vmiklos: no.22:47
vmiklos: it gives the same as git-prune -n (which is the same with --expire now)22:47
vmiklos interesting.22:47
jbwiv or should I simply do $ git checkout -b -r origin/v1_5 ?22:47
brett_h left22:47
marcot vmiklos: do you want to see the repo?22:48
vmiklos well, if it's a bug, then you can try to write a script that demonstrates your problem22:48
marcot I'm not sure how to reproduce this, sorry, I'm not very experienced in git.22:48
I know this is the situation of my repository now.22:48
vmiklos is the repo public?22:49
thiago_h1me joined22:49
thiago_home left22:50
vmiklos jbwiv: isn't v1_5 a tag?22:50
livinded left22:50
jbwiv vmiklos: I believe it's a remote branch...how would I tell?22:50
vmiklos git branch -a lists branches, git tag -l lists tags22:51
jbwiv it's not a tag22:51
because it's tracking a separate line of development22:51
aresnick joined22:51
vmiklos try 'git checkout -b v1_5 origin/v1_5'22:51
then you can work in your local v1_5 branch22:51
jbwiv origin/v1_5 shows up in git branch -a as a remote tag22:51
j_engelh argh svn!22:51
vmiklos git branch lists branches only :)22:52
aresnick Hi! I'm new to git, and I was wondering if it was possible to check out a subset of a repository or branch? That is, if I just wanted to check out a single file, how would I do that?22:53
drewr left22:53
jbwiv vmiklos: here's what is confusing me. The new PragProg Git book says "You can see your local branches when you run git branch. If you add the -r parameter,Git shows you the remote branches"22:53
kukks joined22:53
jbwiv but then it turns around and says22:53
Ilari aresnick: Its not currently supported (there are patches for that)...22:53
marcot vmiklos: yes, it's public.22:53
jbwiv "You can checkout those branches just like a normal branch, but you shouldn’t change them. If you want to make a change to them, create a local branch from them first, then make your change."22:53
vmiklos jbwiv: perfect22:54
jbwiv vmiklos: then it talks about using git pull to do this22:54
but with no example of how22:54
so I tried to create an empty branch off master, and then pull22:54
aresnick Ilari: OK, would you be able to point me to them, offhand?22:54
jbwiv but of course, many conflicts from that22:54
aresnick Ilari: [the patches]22:54
cmarcelo left22:54
vmiklos jbwiv: git checkout -b local origin/remote is the way to create a local branch from a remote/tracking branch22:55
jbwiv vmiklos: so the key is to do 'git checkout -b v1_5 origin/v1_5' instead of 'git checkout origin/v1_5'?22:55
vmiklos yes. only the previous will create a new local branch22:55
jast aresnick, you can always get single files from the repository by using, for example, git show commit:file (or, for checking it out, git checkout commit -- file)22:56
vmiklos the other just updates the working dir, in case you want to compile-test or something22:56
Ilari aresnick: They are in branch 'next' of git.git...22:56
vmiklos (ie: you don't want to commit)22:56
marcot: what's the url?22:56
jbwiv vmiklos: aha...I see. Ok thanks. So is this the equivalent to doing a branch off of master and pulling the changes, or is there a difference?22:56
aside from the pull requiring you to merge?22:56
vmiklos marcot: in fact i think it won't be reproducible if i clone the repo, it's something related to your _local_ reflogs22:57
marcot: so if you really want to let somebody debug this, you probably will need to tar up your repo and upload it22:57
jbwiv: huh, yes. but that's really overcomplicating things :)22:58
if you want to do it 'manually' then do a git branch v1_5 origin/v1_5, then git checkout v1_522:58
marcot vmiklos: ok, I'll upload a tarball.22:58
vmiklos: http://marcot.iaaeee.org/distro-creator.tar.gz22:59
jbwiv vmiklos: great....thank you!22:59
vmiklos marcot: great, i like small repos:)23:00
Ilari jbwiv: There is difference. The case it shows the most is if local master and remote branch have both diverged.23:00
tpiep_ joined23:01
vmiklos marcot: what is the hash of the commit which is in the reflog but now shown by git-prune/fsck?23:01
krh left23:02
jbwiv Ilari: difference between my scenario or vmilkos?23:02
juanjoc left23:02
Ilari jbwiv: Difference of creating new branch off master and pulling and creating new branch out of remote branch.23:02
bugfux left23:03
marcot 9ffcd249dddcea7f7c8914bba4ec833aab0ab58c23:03
Eridius left23:03
jbwiv Ilari: ok, and in my case they have indeed diverged23:03
Ilari jbwiv: Then you might want to merge them. If you created branch out of remote one, then on it 'git merge master'.23:04
marcot vmiklos: http://marcot.iaaeee.org/unreferenced.txt23:04
jbwiv Ilari: i see....ok, thanks!23:05
mcella left23:05
vmiklos marcot: thx23:05
seed__ left23:05
jbwiv left23:05
brain_in_vat left23:07
vmiklos marcot: try 'git fsck --unreachable --no-reflogs'23:08
marcot vmiklos: it showed some commits, but the unreferenced.txt file contains more..23:08
tpiep left23:09
marcot Gotta go now.23:10
There are some commits not in my script but in git fsck --unreachable --no-reflogs, and the other way around two.23:10
vmiklos yes, it is interesting ;)23:10
sohum_ joined23:11
marcot vmiklos: http://marcot.iaaeee.org/fsck.txt23:11
Bye, I'll come back here latter.23:11
marcot left23:11
sohum left23:12
sohum_sohum23:12
ebzzry_ joined23:13
berndj left23:13
mcella joined23:14
ebzzry left23:15
EmilMedve joined23:18
ebzzry_ left23:20
Ryback_ left23:21
ph^_ left23:22
__name__ left23:22
tpiep_ left23:28
snitko left23:29
aroben left23:29
corybantic_ left23:32
Sigma left23:33
elmex left23:33
scientes joined23:34
_graham_ left23:34
fg3 left23:34
Eridius joined23:35
jpschewe joined23:35
loincloth left23:39
_Vi joined23:39
wwwald joined23:40
loincloth joined23:40
jpeeler left23:45
PhilK joined23:45
jpschewe I'm looking for some help with git-pull. I'd like to use git-pull to "push" changes from my local repository to the remote repository because the remote repository isn't accessible from my local repository and the remote repository is git-svn.23:45
cbreak log in on the remote end and pull?23:46
rolfb joined23:46
jpschewe Except the remote end can't access the local side.23:46
Ilari jpschewe: Ouch. Pull is fetch + merge, and merges and SVN don't mix... :->23:46
cbreak so neither can access the other23:47
QBall local cannot access remote and remote cannot access local23:47
cbreak how do you expect anything to work?23:47
QBall that is gonna be iffy23:47
lamont` joined23:47
ceej left23:47
cbreak you could use an intermediate bare repo23:47
Ilari jpschewe: 'git bundle' ('sneakernet transport')?23:47
jpschewe local can access remote, but remote cannot access local.23:47
cbreak then you can push?23:48
or is remote non-bare?23:48
jpschewe But the repo isn't bare.23:48
cbreak make a bare one then :)23:48
rolfb left23:48
cbreak or do some post-update hook magic hackery23:48
Ilari Or remap the ref name and complete the transfer from remote side...23:48
loki_val joined23:48
intripoon left23:48
jpschewe ilari that's what I was thinking of, how does one do this?23:49
loki_val What's the config switch to make git look extra hard for copied files?23:49
lamont left23:49
Ilari jpschewe: 'git push <URL-or-nick> <branch>:<remote-newbranch>' and then on remote 'git merge <remote-newbranch>'...23:49
intripoon joined23:49
ceej joined23:50
jpschewe will that work with git-svn being the remote repo too?23:50
Ilari jpschewe: Ouch... There's git-svn involved... Then you probably need to rebase your changes on version fetched from remote...23:51
jpschewe Hmm, I think I'll just copy teh files back.23:52
thanks.23:52
wwwald left23:53
lamont`lamont23:53
metzemetze_away23:53
yonkeltron joined23:54
jpeeler joined23:55
Ilari vmiklos: Regarding the 'strange untracked file behaviour', perhaps local branch and remote branch have diverged; They both tracked that file at last common ancestor, but both sides have dropped it. Now when merging, the remote set of changes includes deletion of that file. That could explain why it tries to remove untracked file.23:55
mithro left23:55
yonkeltron can someone explain git packs to me? i've tried to figure it out on the docs and such but have had less success than i would have liked23:57
cannonball left23:57
loincloth left23:57

Logs Search ←Prev date Next date→ Channels Documentation