Perl 6 - the future is here, just unevenly distributed

IRC log for #git, 2017-04-14

| Channels | #git index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 hseg So my other repo is missing reflog and rebase-merge
00:01 rwp Sorry but I don't know what the various git commands look for in .git which if missing would trigger a "fatal: Not a git repository" message.
00:01 rwp So not sure what to suggest next.
00:02 peacememories joined #git
00:02 hseg Well, the working repo has .git/HEAD
00:03 rwp Yes that would be one important thing.
00:03 hseg Maybe if I copy a HEAD from the reflog, it will work?
00:03 rwp Possibly.
00:03 rwp It should just say "ref: refs/heads/master" unless you were on a different branch.
00:04 msonntag joined #git
00:04 bttf joined #git
00:05 dsdeiz joined #git
00:05 hseg Yep, writing ref: refs/heads/master did the trick, now it recognizes it as a git repo.
00:05 theiostream joined #git
00:05 rwp Yay!
00:05 hseg :) !!!
00:05 rwp Doing some investigation it looks like 'git status' calls stat(2) on . then .git, then .git/objects, .git/refs, .git/HEAD, /etc/gitconfig, .git/config, and a few others files.
00:06 cqi joined #git
00:08 Cabanossi joined #git
00:09 nick123 joined #git
00:09 hseg OK. So now I'm back to the original problem I wanted to solve:
00:09 rwp "yak shaving". You gotta love it! :-)
00:09 hseg :)
00:09 rewt joined #git
00:10 hseg I edited the commit message prior to a branch point. Normally, I'd just rebase the branch and be done with it.
00:11 hseg However, my history is: master has two branches foo and bar branching off the same commit, and they were merged into a third branch quz.
00:11 hseg While I can rebase foo and bar onto master, how do I rebase quz onto the new foo and bar?
00:13 rwp And how during all of that was .git/HEAD somehow removed? That obviously wasn't meant to happen.
00:13 hseg I have no idea.
00:13 rwp Perhaps by the time there is all of the stacked commits on top of something that trying to edit that history isn't worth it.
00:14 hseg Possible.
00:14 rwp But if you still want to do it then you would be able to rebase each of the tracks that lead to the merge and do what you want. With some effort.
00:15 hseg It might be useful, if just for the exercise. Mind walking me through it?
00:15 rwp I usually avoid those types of cases so am not well versed in the recipe... But I think you need to rebase from each of the commits from just before the merge that you want to change.
00:15 rwp Then do the merge again on the newly rebased branches.
00:15 Vampire0 cahoots, are you sure this has nothing to do with that LFS message right before the Not found?
00:16 rwp There are probably better ways of doing it. But if you unpack the forks and merges, rebase each branch individually, then merge them again, you should achieve your desired result.
00:16 hseg So rebase the parent commits of the merge node, remerge, then rebase the merge node's children onto the new merge node?
00:17 rwp Yes at least up through the first part. But I don't quite follow the "rebase the merge node's children onto the new merge node" part.
00:17 Shakeel_ joined #git
00:17 rwp You said "master has two branches foo and bar branching off the same commit" that you were trying to edit.  So rebase each of foo and bar on top of the new edited commit.
00:18 rwp "and they were merged into a third branch quz" will be the merge you need to do again with the newly rebased branches.
00:18 hseg Yeah, but quz has some commits that are neither on foo nor on bar.
00:19 rwp That branch will still exist. You can cherry pick from it onto the new merged rebased branches.
00:19 hseg So basically, create a new merge node and cherry pick all the children on the newly merged rebased branches?
00:19 rwp Basically I would start back in time when things were simpler, simple enough to do your rebasing, then walk forward in time applying each section of the history onto your new branches.  Conceptually.  Hopefully that makes sense...
00:20 rwp Yes.
00:20 hseg OK.
00:20 rwp There is almost certainly a simpler way to do this.  But I am sure this will work.  And I don't have the knowledge to suggest simpler alternatives.
00:22 hseg Actually, found another way on a whim: merged the two rebased branches, then rebased the merge onto the new merge node.
00:23 rwp Oh good!  So you have accomplished what you set out to accomplish?
00:23 hseg Yes.
00:23 hseg One final yak is left to be shaved, and then I'll be satisfied with the state of my repo.
00:24 hseg I see the repo contains some refs to detached commits. I have all the data from those commits, and don't need them. Is there a way to kill them?
00:24 rwp git gc
00:25 rwp Or is it git prune?
00:25 nexemacs joined #git
00:25 hseg Tried, didn't remove those commits.
00:25 Vampire0 hseg, what do you mean by refs to detached commits?
00:25 Vampire0 hseg, if a ref is pointing to them, they are not detached
00:25 hseg The commits are referred to only by refs/original/refs/stash and refs/original/refs/heads/master
00:25 hseg You are correct
00:26 hseg No branch points to them, but reflog still does
00:26 Vampire0 hseg, "only" is enough. As long as they are referenced by any ref (or even the reflog of a ref), they will be kept
00:26 hseg (this is probably an artifact from my editing the very first commit in the history)
00:26 hseg OK, is there a way to prune the reflog?
00:26 Vampire0 hseg, refs/original is not the reflog, but the backup copy of filter-branch
00:27 Vampire0 hseg, yes, man git reflog
00:27 gitinfo hseg: the git-reflog manpage is available at http://jk.gs/git-reflog.html
00:27 hseg Oh. I ran filter-branch to get CRLF's out of my tree
00:28 Vampire0 hseg, something like `git reflog --expire=all --all` I think
00:28 Vampire0 hseg, but be aware that you will also loose all stashes with this
00:29 Vampire0 hseg, or at least all but the latest one
00:29 hseg Have no stashes ATM.
00:29 Vampire0 hseg, the list of stashes is implemented via reflog, so you also loose older stashes after the reflog expire date which is 90 days be default
00:30 hseg Hmm. Just to be on the safe side, I think I'll delete the reflogs one at a time.
00:34 rwp hseg, I will leave you with this though: Be careful when rewriting history. It may push you to use the dark side of the --force
00:34 hseg I must have misunderstood what git reflog delete does, because deleting the entries regarding that commit don't seem to do anything.
00:34 hseg rwp: :D
00:35 hseg Vampire0: Nope, playing with the reflog did nothing.
00:37 hseg even git gc --aggressive doesn't kill them
00:39 Vampire0 hseg, what reflog delete command did you try exactly?
00:39 hseg I tried git reflog expire --expire=all --all
00:39 hseg As well as git gc --aggressive
00:39 hseg and git gc --prune=now
00:39 Vampire0 hseg, and?
00:40 hseg git log still finds the commits
00:40 Vampire0 hseg, of course
00:40 Vampire0 hseg, I already told you that refs/original has **nothing** to do with the reflog
00:40 hseg ?
00:40 hseg Right, you said it's the filter-branch backup
00:41 Vampire0 hseg, you can do as much as you want with gc and reflog, as long as refs/original points to your commits, they will stay
00:41 hseg Right, so how do I kill it?
00:41 Vampire0 hseg, rm -rf .git/refs/original
00:41 thebope_ joined #git
00:42 fatalhalt joined #git
00:42 hseg Nope, still there, even after gc --aggressive.
00:42 Vampire0 hseg, what is still there?
00:42 Vampire0 refs/original?
00:43 hseg The commits still appear in log even after I delete refs/original
00:43 Vampire0 Do you have tags pointing to them?
00:43 hseg Nope, refs/heads and refs/tags are empty
00:44 hseg Haven't set up tags in this repo yet
00:44 hseg packed-refs?
00:44 hseg Yep, there they are.
00:45 Vampire0 hseg, well, if still tags are pointing to the commits, they of course will also not get nuked ;-)
00:45 fahadash joined #git
00:46 hseg :) They also appear in info/refs
00:46 Vampire0 hseg, I don't remember info/refs
00:47 hseg Seems to be similar to packed-refs
00:47 hseg BTW, any reason to keep ADD_EDIT.patch and COMMIT_EDITMSG around?
00:48 hseg I don't see who could be pointing to those commits
00:49 Vampire0 COMMIT_EDITMSG should be the file that you edit with vim to construct the commit message, so probably not, will be recreated on next commit though
00:49 duderonomy joined #git
00:50 Vampire0 Dunno about ADD_EDIT.patch, I guess you had some failed `git apply` that was stuffed there or so, look inside maybe you recognize something
00:50 hseg Seems like a staged commit, but my directory is clean.
00:50 Vampire0 And do `git describe --all <commit-ish>` with the SHA of the commit you want to go, what does it tell?
00:51 hseg original/refs/stash
00:51 Vampire0 There you have your reference
00:51 Vampire0 You still have refs/original and the stash from there is still referencing the commit
00:52 hseg Except ls .git/refs shows only heads and tags, both of which are empty
00:53 Vampire0 hseg, well, then you probably have repacked and so the refs are in the packfile, then use man update-ref to delete the original refs
00:53 Vampire0 hseg, never trust on what you see in .git, always use git commands
00:54 hseg You told me to rm
00:54 Vampire0 hseg, I didn't know you packed them
00:54 hseg Me neither.
00:54 Vampire0 hseg, do `git for-each-ref`
00:55 hseg Not sure what you want me to do.
00:55 Vampire0 hseg, !justdo
00:55 gitinfo hseg: [!justdoit] If you go to the trouble of asking questions, please go to the trouble of taking the advice offered, Take backups (type "!backup" as a reply to learn more) if necessary -- or in fact, it's a good idea anyway. You can almost always censor log messages if you have to.  We are literally helpless unless you tell us what we need or do what we ask.  Please, Just Do It™.
00:56 hseg Of course. You mean run git for-each-ref verbatim?
00:56 hseg Should have trusted you.
00:56 Vampire0 yes, I meant verbatim
00:56 hseg for-each-ref lists my branches and refs/original
00:57 Vampire0 Of course ;-)
00:57 hseg (it's just that for-each-ref seemed to need another parameter)
00:58 Vampire0 hseg, nope, you can give it other parameters but you don't need to
00:58 Vampire0 hseg, actually it is meant to generate a list that you then can iterate with a for-each loop. At least that is how I interpret the name of the command
00:59 Vampire0 hseg, `git for-each-ref --format='%(refname)' refs/original | xargs -rl git update-ref -d`
01:00 hseg Yay! They're gone!
01:00 hseg Thank you so much!
01:01 Ryanar joined #git
01:02 Vampire0 hseg, yw
01:02 gitinfo hseg: This channel tracks karma based on who has gotten lots of thanks for being helpful. If you want to help someone reach karmic nirvana, please mention their name when thanking them with "thank you", "thankyou", "thanks", "thx", "ty" or "cheers". Try ".karma <nick>" or ".topkarma" to show karma status of a person.
01:02 fstd_ joined #git
01:02 hseg Vampire0: Thank you!
01:02 hseg Did that work?
01:02 hseg Vampire0: ty
01:03 hseg .karma Vampire0
01:03 gitinfo the Genuine Real Life Karma™ REST API results are back! v‍ampire0: 32 (3 in past 30 days) (4 given out)
01:04 dsdeiz joined #git
01:04 dsdeiz joined #git
01:05 stoopkid joined #git
01:08 Cabanossi joined #git
01:08 ivo_ joined #git
01:08 Vampire0 hseg, should be, yes. :-)
01:09 nick123 joined #git
01:10 hseg Great
01:10 Rodya_ joined #git
01:10 hseg Well, I'm gonna turn in. Good night
01:12 rewt joined #git
01:14 bronson joined #git
01:23 durham_ joined #git
01:28 theiostream joined #git
01:30 ali1234 is there a quick one-liner to create a test repo with some commits? i don't care what they are, and i don't want to clone something from the internet
01:33 svm_invictvs joined #git
01:38 Cabanossi joined #git
01:38 matoro joined #git
01:39 cyphase joined #git
01:42 fakenerd joined #git
01:46 Eugene `git init; touch foo; git add foo; git commit -m 'Add foo'; touch bar; git add bar; git commit -m 'Add bar'`
01:46 thebope_ joined #git
01:46 sunri5e joined #git
01:49 ilbot3 joined #git
01:49 Topic for #git is now Welcome to #git, the place for git help. Just git help, apparently. | Public logs at http://jk.gs/glog | First visit? Read: http://jk.gs/git | Current stable version: 2.12.2 | Getting "cannot send to channel"? /msg gitinfo .voice | This is serious business. https://madeitwor.se/git-jokes
01:54 thiago joined #git
01:54 durham joined #git
01:57 masuberu joined #git
01:58 netj joined #git
02:00 dsdeiz joined #git
02:00 durham joined #git
02:00 dermoth joined #git
02:05 Anja joined #git
02:06 Goplat joined #git
02:06 cagedwisdom joined #git
02:07 chachasmooth joined #git
02:08 Cabanossi joined #git
02:10 telephone joined #git
02:10 telephone joined #git
02:10 nick123 joined #git
02:11 jameser joined #git
02:13 drodger joined #git
02:16 TbobbyZ joined #git
02:20 durham joined #git
02:21 exotime joined #git
02:24 cqi joined #git
02:26 ojdo joined #git
02:27 inflames joined #git
02:30 fakenerd joined #git
02:30 fakenerd_ joined #git
02:31 Motoko joined #git
02:31 peepsalot joined #git
02:32 Motoko joined #git
02:36 cqi joined #git
02:38 jeffreylevesque joined #git
02:40 Ryanar joined #git
02:43 thebope_ joined #git
02:43 Lea2 joined #git
02:44 Lyqyd joined #git
02:44 theiostream joined #git
02:49 fakenerd joined #git
02:49 Vortex35 joined #git
02:55 dsdeiz joined #git
02:55 carousel joined #git
02:59 lagothrix joined #git
03:04 SpeakerToMeat joined #git
03:04 sbulage joined #git
03:06 hexagoxel joined #git
03:09 gottcha joined #git
03:09 astrofog joined #git
03:10 buzzLightBeer joined #git
03:10 SwiftMatt joined #git
03:11 nick123 joined #git
03:11 HelloShitty joined #git
03:12 aavrug joined #git
03:14 ahrs joined #git
03:18 buzzLightBeer joined #git
03:18 axh joined #git
03:20 leprechau joined #git
03:20 alexggordon joined #git
03:20 ali1234 i think i have finally finished shaving this yak: http://paste.ubuntu.com/24377989/
03:24 ali1234 this pulls the repo if it doesn't exist, then it updates the .timestamp to match the newest of either the reflog for HEAD, or the newest modified file that isn't ignored
03:24 safe joined #git
03:25 ali1234 so anything depending on the timestamp only gets rebuild if you change what is checked out, commit something, or the repo is dirty and also the dirty files are newer than the last build
03:25 BSab joined #git
03:27 nivag joined #git
03:29 souther joined #git
03:30 dreiss joined #git
03:30 SwiftMatt joined #git
03:31 fakenerd joined #git
03:33 lavalamp joined #git
03:36 Cabanossi joined #git
03:37 pxfgod joined #git
03:38 SwiftMatt joined #git
03:42 mizu_no_oto joined #git
03:42 pxfgod +++0   c+
03:44 thebope_ joined #git
03:44 pxfgod vvcvcvnm,.
03:44 pxfgod """""""?:>?>MNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBVVVVVVVVVVVC\]]]]]]]]]]]]\\\\\\\\\\\\\\\\]\\\\\\\\\\\\\\\\
03:44 pxfgod left #git
03:45 drodger joined #git
03:47 nivag joined #git
03:49 dsdeiz joined #git
03:53 souther joined #git
04:06 ojdo joined #git
04:07 snowalpaca joined #git
04:07 pmn joined #git
04:07 dave0x6d joined #git
04:10 pks joined #git
04:11 ali1234 question: if i run "git ls-files -mo --exclude-standard" is it very slow every time. if i run "git status" (which shows pretty much the same thing) it is slow only the first time. and then if i run the ls-files again, that is now fast as well. why?
04:12 nick123 joined #git
04:12 bket joined #git
04:14 ali1234 or more simply put: why does "git status" make subsequent "git ls-files" faster?
04:14 telephone joined #git
04:14 telephone joined #git
04:17 roger_raymond joined #git
04:20 TbobbyZ joined #git
04:29 telephone joined #git
04:29 telephone joined #git
04:31 fahadash joined #git
04:32 aidalgol joined #git
04:33 buzzLightBeer joined #git
04:34 rschneberger joined #git
04:36 Introoter joined #git
04:38 mehola joined #git
04:39 freddy__ joined #git
04:44 dsdeiz joined #git
04:44 dsdeiz joined #git
04:45 thebope_ joined #git
04:47 nick123 joined #git
04:48 drodger joined #git
04:51 Cabanossi joined #git
04:52 jimklo_ joined #git
04:56 ejnahc joined #git
04:57 SebastianFlyte joined #git
04:59 deltatemp1996 joined #git
05:00 leprechau joined #git
05:00 thebope joined #git
05:01 deltatemp1996 hello all. Just started trying and reading about git using Pro git book. Any suggestions?
05:01 finalbeta joined #git
05:02 nivag joined #git
05:05 diogenese joined #git
05:07 dec0n joined #git
05:07 Bock joined #git
05:08 rwp deltatemp1996, If you have questions please feel free to ask.
05:13 Saint_Isadore joined #git
05:16 creamandonion199 joined #git
05:20 scoobertron joined #git
05:22 deltatemp1996 left #git
05:27 creamandonion199 joined #git
05:28 fakenerd joined #git
05:28 lavalamp joined #git
05:29 creamandonion199 Can someone suggest me a good IRC client for connecting to here?
05:30 imack joined #git
05:30 Saint_Isadore I love textual irc client
05:30 dmarr LimeChat
05:31 creamandonion199 For ubuntu
05:34 pwnz0r joined #git
05:35 Saint_Isadore XChat perhaps
05:35 overlord_tm joined #git
05:37 sea-gull joined #git
05:38 dsdeiz joined #git
05:39 dmod__ left #git
05:40 freimatz joined #git
05:45 thebope joined #git
05:46 creamandonion199 left #git
05:52 Cabanossi joined #git
05:52 inflames joined #git
05:55 aivkiv joined #git
05:59 fakenerd joined #git
06:02 rscata joined #git
06:03 waveclaw joined #git
06:03 dreiss joined #git
06:04 mit1 joined #git
06:05 mit1 left #git
06:11 z8z joined #git
06:12 JeroenT joined #git
06:12 JeroenT_ joined #git
06:12 zeroed joined #git
06:13 jagob joined #git
06:13 pietv joined #git
06:16 mmh joined #git
06:16 marianina8 joined #git
06:19 aw1 joined #git
06:20 fakenerd joined #git
06:21 oskarkv joined #git
06:21 Cabanossi joined #git
06:24 TbobbyZ joined #git
06:25 jkl joined #git
06:26 zeroed joined #git
06:26 freddy__ joined #git
06:28 howdoi joined #git
06:28 zerow joined #git
06:29 jkl1996 joined #git
06:30 Disgeae joined #git
06:34 dsdeiz joined #git
06:35 aax joined #git
06:36 dave0x6d joined #git
06:37 ogny joined #git
06:38 jstimm joined #git
06:39 sea-gull joined #git
06:39 ayogi joined #git
06:39 fakenerd joined #git
06:40 ayogi joined #git
06:41 freddy__ joined #git
06:42 _ikke_ weechat
06:45 jkl1996 joined #git
06:46 Darren_ joined #git
06:46 rts-sander weeeeee
06:46 thebope joined #git
06:46 axh_ joined #git
06:49 jkl1996 joined #git
06:50 jkl1996 joined #git
06:51 JeroenT joined #git
06:53 sz0 joined #git
06:54 Tee_Pee joined #git
06:55 jkl1996 joined #git
06:57 theiostream joined #git
07:01 lordjancso joined #git
07:02 rokups joined #git
07:02 ZyX-I joined #git
07:05 rominronin joined #git
07:08 JeroenT joined #git
07:09 jesst joined #git
07:09 Seveas xchat is dead, hexchat replaces it
07:10 drodger joined #git
07:10 fatalhalt joined #git
07:14 MineCoins joined #git
07:15 r0ry joined #git
07:15 drodger joined #git
07:15 jkl1996 i finally landed up on IRCClound.com , a web-based irc
07:16 jkl1996 xchat was too clumsy for me and weechat was too command line.
07:17 pmn joined #git
07:18 _ikke_ command line is gooood :P
07:22 Cabanossi joined #git
07:26 thebope joined #git
07:26 JeroenT joined #git
07:31 ExeciN joined #git
07:34 axh joined #git
07:34 jkl1996 i know, got no time to read docs for everything :(
07:36 qt-x joined #git
07:36 jkl1996 *http://irccloud.com/
07:37 overlord_tm joined #git
07:47 thebope joined #git
07:48 navidr joined #git
07:51 sea-gull joined #git
07:52 LeMike joined #git
07:59 xall joined #git
08:05 User458764 joined #git
08:08 MattMaker joined #git
08:11 manuelschneid3r joined #git
08:11 sunri5e joined #git
08:12 MattMaker joined #git
08:13 JeroenT joined #git
08:14 schleppel joined #git
08:16 MattMaker joined #git
08:17 fakenerd joined #git
08:20 thebope joined #git
08:22 Cabanossi joined #git
08:22 askb joined #git
08:25 Andrew_K joined #git
08:25 leeN joined #git
08:26 [Brain] joined #git
08:27 chll joined #git
08:29 aw1 joined #git
08:30 TbobbyZ joined #git
08:34 sbasso joined #git
08:35 oghamb joined #git
08:35 Werring joined #git
08:36 JeroenT_ joined #git
08:37 anddam left #git
08:43 Orion3k joined #git
08:44 fakenerd joined #git
08:47 canoon joined #git
08:48 thebope joined #git
08:49 cdown joined #git
08:50 ayogi joined #git
08:52 ayogi joined #git
08:52 afuentes joined #git
08:53 cyphase joined #git
08:53 ayogi joined #git
08:53 rts-sander joined #git
08:54 ayogi joined #git
08:55 govg joined #git
08:56 ayogi joined #git
08:57 ayogi joined #git
08:58 MineCoins joined #git
08:59 ayogi joined #git
09:01 aielima joined #git
09:02 dhollin3 joined #git
09:02 Guest24_ joined #git
09:06 earnestly joined #git
09:12 ispn joined #git
09:14 thebope joined #git
09:16 Murii joined #git
09:18 adgtl- left #git
09:19 Acerific joined #git
09:19 fakenerd joined #git
09:19 plexigras joined #git
09:22 mikecmpb_ joined #git
09:25 drodger joined #git
09:26 satifant joined #git
09:31 gigq joined #git
09:34 cqi joined #git
09:37 Darcidride joined #git
09:41 MrRicecake joined #git
09:42 ulfox joined #git
09:42 Guest24_ joined #git
09:45 eldritch joined #git
09:47 irqq joined #git
09:48 thebope joined #git
09:48 Peuc joined #git
09:50 fakenerd joined #git
09:51 sbasso joined #git
09:52 Cabanossi joined #git
09:52 basiclaser joined #git
09:55 ferr joined #git
09:57 Guest24_ joined #git
09:57 anderson joined #git
09:57 Zialus joined #git
09:58 telephone joined #git
09:58 telephone joined #git
09:59 neunon joined #git
09:59 finalbeta joined #git
10:01 JeroenT joined #git
10:02 alexandre9099 joined #git
10:06 sbasso joined #git
10:06 paws_ joined #git
10:08 blahdodo joined #git
10:08 thebope joined #git
10:08 EDAKIRI joined #git
10:09 r0ry joined #git
10:12 Tobbi joined #git
10:14 msonntag joined #git
10:19 fstd_ joined #git
10:20 AndrewAlexMac joined #git
10:22 Cabanossi joined #git
10:23 s17 clowned
10:24 fakenerd joined #git
10:25 theoceaniscool joined #git
10:25 User458764 joined #git
10:25 jameser joined #git
10:26 User458764 joined #git
10:27 visual jkl1996: in the long run, you waste *more* time by not going command-line, quicker configs if you go with a cloud-based ZNC, easier aliases setup, thousands of ready-made client scripts, all made to make your irc experience more efficient & pleasant
10:27 TheWild joined #git
10:27 TheWild hello
10:28 visual look up IRSSI scripts, znc, aliasing if you're spending a lot of time on irc, and really putting an emphasis on efficiency
10:28 bremner visual: one aspect of efficiency is not talking to people that have left
10:28 visual (btw google & aws both offer free 1-year subscription for their cloud services, with google extending it to unlimited time with limited bandwith after the 12 months is over)
10:28 visual perfect place to put a znc
10:28 TheWild I have two questions: 1. How to do diff of two files not necessary in reposiroty? 2. How to apply a diff of one file to another?
10:28 visual bremner: he hasnt left, i tabbed his name
10:29 visual well he may not be here atm, but he's still connected to the thing, and will get notified he's been highlighted
10:29 bremner if you say so...
10:29 visual TheWild: repository aside, diff accepts 2 files paths as parameters
10:30 visual diff file1 file2
10:31 visual bremner: hell maybe this info will be interesting for somebody else, i know it was for me at one point :I
10:31 bremner TheWild: for your second question, you can use the patch command to apply a diff outside a repo
10:31 visual but i get your joke
10:31 visual )
10:32 MrRicecake joined #git
10:33 TbobbyZ joined #git
10:38 pietv joined #git
10:39 ZyX-I joined #git
10:45 TheWild there's currently too much mess in my reposiroty to try it out but I suppose it does work.
10:45 TheWild thanks visual, bremner
10:47 tomatopeel joined #git
10:47 bremner there should be an option for git-diff to use it as a generic diff program (including files not in the repo), but I can't remember it now
10:47 aw1 joined #git
10:47 TheWild when doing `git diff file.php`, git prints `diff --git a/file.php b/file.php` and then diff
10:47 TheWild but diff doesn't accept --git option.
10:47 tomatopeel hey I'm following this https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server - re: /srv/git and creating the .git dirs for the projects, is the best practice to do this as the git user and have it own /srv/git, or to do it all as root, or what?
10:47 JeroenT joined #git
10:48 immae joined #git
10:49 tomatopeel oh I guess it'll have to be the git user because that's what needs to ssh and do the stuff...
10:49 bremner TheWild: I don't think "git diff file1 file2" does what you want.
10:49 TheWild omg, got it. it's a `git diff --git a/file1.php b/file2.php`, not `diff --git a/file1.php b/file2.php`
10:49 bremner or just use diff
10:49 thebope joined #git
10:50 robattila256 joined #git
10:50 Jackneill joined #git
10:51 BernhardPosselt joined #git
10:51 BernhardPosselt what do i want when i want to format my git commit message? a pre-commit hook?
10:53 fakenerd joined #git
10:55 _ikke_ BernhardPosselt: prepare-commit-msg
10:56 BernhardPosselt ty
10:56 CussBot joined #git
11:02 dave0x6d joined #git
11:02 thebope joined #git
11:09 pbrewczynski_ joined #git
11:11 freddy__ joined #git
11:11 gnixev joined #git
11:14 kexmex joined #git
11:22 pwnz0r joined #git
11:26 monq joined #git
11:28 Andrew_K joined #git
11:30 YuGiOhJCJ joined #git
11:33 fakenerd_ joined #git
11:34 aw1 joined #git
11:34 pks joined #git
11:35 anuxivm joined #git
11:38 dglambert joined #git
11:38 dglambert yo
11:39 JeroenT joined #git
11:41 Lunatrius` joined #git
11:42 adgtl- joined #git
11:42 sbasso joined #git
11:43 raijin joined #git
11:43 ogny joined #git
11:47 scottjl joined #git
11:49 sbasso joined #git
11:49 JeroenT joined #git
11:50 finalbeta joined #git
11:50 thebope joined #git
11:54 juandpineiro joined #git
11:56 synthroid joined #git
11:56 masuberu joined #git
11:56 thebope joined #git
11:57 finalbeta joined #git
11:58 synthroid joined #git
12:00 JeroenT joined #git
12:00 inflames joined #git
12:01 JeroenT joined #git
12:01 jagob joined #git
12:01 ogny joined #git
12:01 fakenerd joined #git
12:02 JeroenT joined #git
12:03 JeroenT joined #git
12:07 sarri joined #git
12:07 sarri joined #git
12:09 alexggordon joined #git
12:13 lowercaseman joined #git
12:13 synthroi_ joined #git
12:16 troodon_ joined #git
12:17 troodon_ left #git
12:17 FooBizz_ joined #git
12:18 ExeciN joined #git
12:22 drodger joined #git
12:27 Murii joined #git
12:27 dsdeiz joined #git
12:27 dsdeiz joined #git
12:28 ogny joined #git
12:30 Taikibansei joined #git
12:34 finalbeta joined #git
12:35 sbasso joined #git
12:35 ecomaikgolf joined #git
12:38 TbobbyZ joined #git
12:39 ayogi joined #git
12:40 thebinary joined #git
12:41 ebanoid joined #git
12:45 JeroenT joined #git
12:45 MrRicecake joined #git
12:45 marianina8 joined #git
12:46 qt-x joined #git
12:47 ayjay_t joined #git
12:47 JeroenT joined #git
12:48 ayjay_t Does anyone else have an issue where they forget to commit or push or anything like that? Does anyone have a tool that registers your repositories and gives you a centralized "command center"?
12:48 ayogi joined #git
12:48 TheSimonator joined #git
12:50 MrRicecake joined #git
12:50 thebope joined #git
12:51 thebope_ joined #git
12:51 cqi joined #git
12:52 cbreak ayjay_t: forgetting to commit? That's unlikely
12:52 cbreak not pushing can happen
12:52 cbreak but you'll notice as soon as it's not there :)
12:52 kolyafr joined #git
12:55 Acerific joined #git
12:55 Acerific joined #git
12:56 oleo joined #git
12:56 eroux joined #git
12:56 XenophonF joined #git
12:59 MrRicecake joined #git
13:01 fakenerd joined #git
13:01 theiostream joined #git
13:03 jameser joined #git
13:03 ExoUNX joined #git
13:06 pietv joined #git
13:07 freddy__ joined #git
13:08 GT4066 joined #git
13:10 jeffreylevesque joined #git
13:10 cdown joined #git
13:11 re1 joined #git
13:12 nyuszika7h joined #git
13:12 freddy__ joined #git
13:20 Starky joined #git
13:23 pwnz0r joined #git
13:24 drodger joined #git
13:29 drodger joined #git
13:32 ugjka joined #git
13:32 Gustavo6046 joined #git
13:33 kexmex joined #git
13:33 JanC_ joined #git
13:40 chovy_ joined #git
13:41 theiostream joined #git
13:43 netj joined #git
13:44 cmmagid joined #git
13:44 thebope joined #git
13:45 theiostream joined #git
13:46 awc737 joined #git
13:46 MineCoins joined #git
13:47 syx joined #git
13:47 syx Hi
13:47 gitinfo syx: hi! I'd like to automatically welcome you to #git, a place full of helpful gits. Got a question? Just ask it — chances are someone will answer fairly soon. The topic has links with more information about git and this channel. NB. it can't hurt to do a backup (type !backup for help) before trying things out, especially if they involve dangerous keywords such as --hard, clean, --force/-f, rm and so on.
13:47 doener joined #git
13:49 mizu_no_oto joined #git
13:49 bannakaffalatta joined #git
13:50 vkareh joined #git
13:51 onehrxn joined #git
13:51 thebope joined #git
13:52 Cabanossi joined #git
13:54 syx How could I change the author of all of the commits in a repo>
13:54 syx I used git blame-someon-else, but the first three commits are unchanged
13:55 * bremner pretty sure blame-someone-else is not part of git
13:56 syx https://github.com/jayphelps/git-blame-someone-else
13:56 syx you're right though
13:57 govg joined #git
13:57 dermoth_ joined #git
14:03 marianina8 joined #git
14:04 Dougie187 joined #git
14:04 ayjay_t cbreak i forget all the time
14:04 shinnya joined #git
14:04 bronson joined #git
14:04 ayjay_t i definitely need a tool
14:04 vkareh joined #git
14:05 systemovich joined #git
14:05 snowkidind joined #git
14:06 re1_ joined #git
14:07 vkareh joined #git
14:08 visual hey, is there a way to see more information about each files than git status provides?
14:09 visual a.k.a see the diffs from the files? http://prntscr.com/ewf24o
14:09 Dougie187 visual: `git diff HEAD... -- <file(s)>`
14:09 MineCoins joined #git
14:09 visual whhat's after head?
14:10 Dougie187 If they are staged for a commit (as in your image) `git diff --staged HEAD... -- <files(s)>`
14:10 Dougie187 Just three dots.
14:10 Dougie187 Three dots, and a space.
14:10 visual and files = filenames or including path?
14:10 Dougie187 The staged one might not need the HEAD... part actually.
14:10 Dougie187 Including path.
14:10 Dougie187 You could leave off the files if you want all of them
14:11 gugah joined #git
14:11 Dougie187 but the diff is going to be huge for the git status you linked to.
14:11 qqx HEAD... *never* makes sense.
14:11 visual yes worked without HEAD
14:11 visual thank you magic git wizard
14:11 qqx That would be equivalent to HEAD...HEAD
14:11 bannakaf_ joined #git
14:12 visual Dougie187: can i skip the filenames somehow?
14:12 visual like git diff --staged all
14:12 visual or *
14:12 Dougie187 visual: Yes.
14:12 Dougie187 `git diff --staged`
14:12 Dougie187 That will list all of them
14:12 Dougie187 Depending on your git version, `--staged` might be `--cached`
14:13 visual worked, thanks :^)
14:13 synthroid joined #git
14:15 fahadash joined #git
14:17 drodger joined #git
14:19 Bob8989|2 joined #git
14:19 zeroed joined #git
14:20 thebope joined #git
14:22 freddy__ joined #git
14:23 robotroll joined #git
14:23 earnestly joined #git
14:24 Nilesh_ joined #git
14:24 ogny joined #git
14:25 TikityTik joined #git
14:27 thinkpad joined #git
14:27 TheSimonator joined #git
14:33 Rodya_ joined #git
14:38 raijin joined #git
14:38 FooBizz_ left #git
14:39 bannakaffalatta joined #git
14:41 TbobbyZ joined #git
14:41 bannaka__ joined #git
14:41 nickel_dime_look joined #git
14:42 Arguggi joined #git
14:43 canoon joined #git
14:47 dglambert joined #git
14:48 freddy__ joined #git
14:48 dpower joined #git
14:50 basiclaser joined #git
14:51 freddy___ joined #git
14:52 boombatower joined #git
14:53 khfeng joined #git
14:54 sbasso joined #git
14:58 tnecniv joined #git
14:59 TikityTik when doing git log -S"/a/ads/fasdf/())()).)" will that break the string?
15:00 ozcanesen joined #git
15:02 zivester joined #git
15:04 ash_workz I did a bunch of stupid commits so I rewound to a point where everything was kosher and want to commit again... what do I do?
15:06 APic Good Question.
15:06 APic The Answer will interest me as well.
15:07 APic How did You rewind?
15:07 ResidentBiscuit ash_workz: ^ Was about to ask that
15:07 jameser joined #git
15:07 APic wb jameser
15:07 ash_workz fyi
15:07 sammyo joined #git
15:07 ash_workz I ended up switching to a new branch
15:07 ash_workz and pushed that; I think that makes sense logically
15:08 ResidentBiscuit Thats fine
15:08 ResidentBiscuit Is the new branch how you want it?
15:08 ash_workz to rewind I did `git reset --hard <commit>
15:08 APic If i do something stupid, i just undo it and leave it in the History, so maybe somebody (maybe even i at a later Date) can learn from my Mistakes.
15:08 ResidentBiscuit Oh, that's not so much a rewind as it is a wipe
15:08 APic *nod*
15:08 ResidentBiscuit I assumed you had done a soft or mixed reset
15:09 ash_workz ResidentBiscuit: elaborate?
15:09 ash_workz actually
15:09 ash_workz what's that git visualizer..
15:09 ResidentBiscuit ash_workz: Hard reset just wipes out the commits after what you reset to. You can get them back via reflog
15:09 peepsalot joined #git
15:10 TikityTik when doing git log -S"/a/ads/fasdf/())()).)" will that break the string?
15:10 ash_workz does anyone know what I'm talking about when I refer to that visualizer?
15:10 Sleepy63 joined #git
15:10 Bin4ry joined #git
15:10 ash_workz it was like a cool web thing were you could put in git commands and it would show you what the commit history looks like as a tree
15:10 ash_workz it was for learning purposes
15:11 ResidentBiscuit I have no idea. Can you just create a gist of the commands you ran and what state you want to get back to?
15:12 ash_workz ah this
15:12 ash_workz http://learngitbranching.js.org/?NODEMO
15:13 thebope_ joined #git
15:14 raffo joined #git
15:14 agusyc joined #git
15:15 thiago joined #git
15:15 TikityTik I can't do git log -S"[" the command line think I didn't finish typing the command
15:15 TikityTik Also git log -S"\[" doesn't fix it
15:16 karols146 Any helpful tips for guy who just setting his first git server ?
15:17 ayogi joined #git
15:17 ash_workz I don't think my reset affects the remote branch, right? I mean if I switch back to the old branch I did a reset on and do a pull, that should bring me back to the front of that branch, right?
15:17 ash_workz ResidentBiscuit: ^
15:18 ayogi joined #git
15:19 murii_ joined #git
15:19 cdg joined #git
15:19 synthroid joined #git
15:20 jameser joined #git
15:20 drodger joined #git
15:20 publio joined #git
15:21 Cabanossi joined #git
15:22 ozcanesen do i need to do something after i solve git stash pop conflicts?
15:22 ozcanesen for example git merge i do git commit to continue
15:24 davimore_ joined #git
15:27 ResidentBiscuit ash_workz: Your reset does not affect the remote branch, unless you force push. There are many ways of getting back there. I can't figure out what you're trying to accomplish though
15:27 ResidentBiscuit What's your goal?
15:27 eihabarabia joined #git
15:30 dermoth joined #git
15:30 agusyc left #git
15:31 svm_invictvs joined #git
15:31 ash_workz ResidentBiscuit: you're right a gist would probably be helpful
15:34 f0rks joined #git
15:35 dtrott joined #git
15:36 imack joined #git
15:37 davimore joined #git
15:38 AbleBacon joined #git
15:39 orbyt_ joined #git
15:41 sbasso joined #git
15:42 Rodya_ joined #git
15:43 blackwind_123 joined #git
15:44 jstimm joined #git
15:45 ash_workz ResidentBiscuit: https://gist.github.com/anonymous/de85c03d1446820179cad13d868e06b5
15:46 ash_workz ResidentBiscuit: er hem https://gist.github.com/anonymous/4e698b0d68ff96c2b0fc840b19ae3c3a
15:47 ResidentBiscuit If you haven't pushed to old, just `git reset --hard remote/old`
15:48 ResidentBiscuit Your first step is based on a false assumption. After you run `git reset --hard C1`, there is nothing to commit. You've just blown away C2-C4.
15:48 ResidentBiscuit `well it seems like this is commiting to the remote new` No, you can't commit directly to remotes. You can just push changes
15:49 Saint_Isadore joined #git
15:49 ash_workz erm; that's what I meant
15:49 ResidentBiscuit You were still on the original branch. A little tip, `git checkout -b foo` will create and switch to branch foo in one command
15:49 ash_workz ResidentBiscuit: yeah, that's what I _meant_ to do
15:50 ResidentBiscuit The remote new branch is going to be C0-C1
15:50 ash_workz but then I thought to myself... wait a tick... I don't remember typing checkout
15:51 ash_workz I should clarify something in that
15:51 ResidentBiscuit If you just want to get back to C0-C1-C2-C4, first see if the remote branch is what you want. If it's not, the quickest thing to do is to open up reflog and go back to before you did your first hard reset
15:52 dviola joined #git
15:53 ash_workz ResidentBiscuit: well, atm, it's more important to just get D3 on the new branch... I think I might just get rid of the old branch...
15:53 idlemind joined #git
15:53 ResidentBiscuit So new needs to be C0-C1-D3?
15:54 ash_workz the thing I should clarify is that to find out what the status of the remote _new_ branch was, I did `git checkout new; git pull origin new`. I was surprised to find out it didn't have D3
15:54 ash_workz Well, I was actually just thinking C0-C1-D2-D3 ... even though D2 also has a mistake
15:54 z8z joined #git
15:55 ResidentBiscuit You can just cherry pick D3 off of old into new
15:56 ash_workz ResidentBiscuit: how do I do that?
15:56 ResidentBiscuit `git checkout new; git cherry-pick D3` where D3 is the hash for that commit
15:56 Emperor_Earth joined #git
15:56 ResidentBiscuit You can get the hash by looking at the log in old
15:57 ash_workz if I am to leave _old_ I would want to remove the D commits.... maybe even C2-C4 ... they really shouldn't have been on that branch to begin with
15:57 ash_workz yeah
15:58 ResidentBiscuit If you want to do that, I'd say the easiest way is to do an interactive rebase and keep the commits you want
15:59 sbasso joined #git
15:59 scoobertron joined #git
16:02 BSaboia joined #git
16:02 ash_workz ResidentBiscuit: how do you do that?
16:03 dreiss joined #git
16:05 sz0 joined #git
16:06 Lencl joined #git
16:07 Lencl left #git
16:07 durham joined #git
16:07 madewokherd joined #git
16:09 ResidentBiscuit `git rebase -i <commit you want to go back to>` You'll get an editor that tells you how to do everything from there
16:10 Micha_Btz joined #git
16:11 Micha_Btz I have a question with patches from git to git. Is there a way to get the patches directly with git? for example git cherry-pcik  https://android.googlesource.com/platform/frameworks/av/+/4b49489c12e6862e9a320ebcb53872e809ed20ec
16:12 lavalamp joined #git
16:12 tchan joined #git
16:12 tchan joined #git
16:12 Micha_Btz I will try to commit the security patches to a local git lineageos repo from the google original code
16:13 Micha_Btz What will be the best way to do so?
16:15 jstimm joined #git
16:17 rewt Micha_Btz, if you mean have git generate patches, use git diff
16:17 Random832 Micha_Btz, any reason you can't add the other repository as a remote?
16:19 nitric joined #git
16:19 Micha_Btz Random832: must i add the complete remote repo or it is possible to get it only via link?
16:20 gunner_ joined #git
16:20 Micha_Btz rewt: git diff i can only use if i get the complete code, that are about 30GB and i only need some single patches
16:21 Random832 Micha_Btz, i mean if you can generate a correctly formatted diff you can use git apply.
16:21 rewt Micha_Btz, if it's a recent change, you can make a shallow clone
16:21 ali1234 joined #git
16:22 rewt git operates only on your local repo, so if you want git to do it, it has to be local
16:22 Micha_Btz yeah but how can i get the patch remotly?
16:22 Random832 curl (the "txt" link at the bottom) | base64 -D seems to give a correctly formatted patch, but not including metadata
16:23 gunner_ Hello, I am having an issue with pushing to remote. I made some changes and committed them. Then when I try to push to remote I get error error: failed to push some refs to ... hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart.
16:24 rewt getting a patch from a remote depends entirely on what the remote is running on top of git; git is just the repo, any interface they have runs on top of git
16:24 gunner_ But when I do another git fetch it does not bring in any changes
16:24 Random832 gunner_, you can't just fetch, you have to rebase or merge too
16:25 Random832 since you already fetched, try git merge remote/branch or git rebase remote/branch
16:25 Random832 (remote/branch e.g. origin/master)
16:25 aielima joined #git
16:26 Rodya_ joined #git
16:26 gunner_ Ah, that seemed to do the trick. I was confused because I thought if I did a git fetch I could see the changes before I merged them.
16:29 Random832 yeah but then you have to actually merge them
16:29 Random832 you probably saw them the first time you fetched and overlooked them
16:31 petersaints joined #git
16:31 Micha_Btz Random832: hm, can curl to get this. Metadata would be nice but not directly needed
16:31 mikecmpbll joined #git
16:33 ali1234 how can i get a list of all .gitignore files that affect the current repository?
16:34 gunner_ Thanks
16:34 _ikke_ ali1234: ls **/.gitignore
16:35 _ikke_ ali1234: find . -name .gitignore
16:35 jesst joined #git
16:35 davimore joined #git
16:35 freimatz joined #git
16:35 ali1234 find does not work. it will leave the repository and go into a submodule
16:36 ali1234 ls **/.gitignore does not work because it will not check directories recursively
16:36 jimklo joined #git
16:36 nd joined #git
16:36 qqx You can use `git ls-files '**/.gitignore'` to list ones that are tracked.
16:36 ali1234 i want all the ones that affect the repository, whether they are tracked or not
16:37 ali1234 git ls-files will also list deleted ones that no longer affect the repository
16:37 _ikke_ git check-ignore
16:37 _ikke_ man git check-ignore
16:37 gitinfo the git-check-ignore manpage is available at http://jk.gs/git-check-ignore.html
16:37 relipse joined #git
16:38 ali1234 git check-ignore tests a path against the .gitignore
16:38 ali1234 it does not list the .gitignore files
16:38 _ikke_ right
16:38 ayjay_t joined #git
16:38 _ikke_ Then there is no built-in option
16:39 ali1234 oh.
16:39 ali1234 well, is there a way to list all existing files in the workdir except for the ones that are ignored?
16:39 Es0teric joined #git
16:39 bronson joined #git
16:40 _ikke_ git ls-files -mo --exclude-standard
16:40 ayogi_ joined #git
16:40 ali1234 that only lists modified files
16:40 _ikke_ sorry, -mo
16:40 _ikke_ arg
16:40 _ikke_ -co
16:40 texasmynsted joined #git
16:40 ali1234 -co lists deleted files
16:41 ali1234 i don't want any files that don't exist in the workdir
16:41 ayogi_ joined #git
16:41 _ikke_ the -d option seems to imply that it doesn't ..
16:41 ali1234 > implying implications...
16:41 texasmynsted how do I search for either: When a particular directory existed in the history.  and or When a particular directory was removed from history?
16:42 zeroed joined #git
16:42 ali1234 _ikke_: "deleted" in this contents means "staged for deletion" ie "git rm" but not "rm"
16:42 zeroed joined #git
16:42 texasmynsted all I can see is that a part of the directory tree is missing.  I can't recall the exact names of the files that lived there but they are surely gone.
16:44 drodger joined #git
16:44 _ikke_ texasmynsted: git does not separately track directories
16:45 _ikke_ ali1234: git ls-files -cd even shows the deletd file twice
16:45 ali1234 wat
16:45 qqx texasmynsted: You can use `git log -n1 <directory>` to find the last commit which modified anything in the directory (including removing).
16:46 qqx Actually `git log -n1 -- <directory>`.
16:47 Bin4ry joined #git
16:49 texasmynsted ok will try that
16:49 texasmynsted thank you
16:50 syx left #git
16:53 Micha_Btz Random832: ok, i have get curl to get the txt but this is only the header and not the code patch
16:53 Random832 Micha_Btz, really? for me it was the other way around, just the code patch and no header information
16:54 Micha_Btz curl https://android.googlesource.com/platform/frameworks/av/+/4b49489c12e6862e9a320ebcb53872e809ed20ec?format=TEXT | base64 -d
16:54 Micha_Btz % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
16:54 Micha_Btz Dload  Upload   Total   Spent    Left  Speed
16:54 Micha_Btz 100   688    0   688    0     0   2480      0 --:--:-- --:--:-- --:--:--  2474
16:54 Micha_Btz tree c0e73d122ec6691384ef8f0b16debb3a1c60fdb3
16:54 Random832 are you on the diff page?
16:54 Micha_Btz parent c2f0c73bfcf36219f446e3eef9effe49a3a415a5
16:54 Micha_Btz author Eino-Ville Talvala <etalvala@google.com> 1485991661 -0800
16:54 Micha_Btz committer Eino-Ville Talvala <etalvala@google.com> 1486064456 -0800
16:54 Micha_Btz CameraBase: Don't return an sp<> by reference
16:54 Micha_Btz If the server dies, the binder death callback clears out
16:54 Micha_Btz the global camera service sp<>, and any current references to it
16:54 Micha_Btz will become quite unhappy.
16:54 Micha_Btz Test: Camera CTS passes
16:54 Micha_Btz Bug: 31992879
16:54 masuberu joined #git
16:54 Random832 oh wait, yeah, i'd clicked through to the diff page before doing that
16:55 Random832 curl 'https://android.googlesource.com/platform/frameworks/av/+/4b49489c12e6862e9a320ebcb53872e809ed20ec%5E%21/?format=TEXT' | base64 -d
16:55 cdown_ joined #git
16:55 Micha_Btz ah, on the diff page it works
16:57 _ikke_ ali1234: comm -23 <(git ls-files -c | sort) <(git ls-files -d | sort)
16:57 _ikke_ ali1234: in my brief test, this seems to work
16:57 Micha_Btz ok Random832, this is a way i can get. thanks a lot
16:59 texasmynsted thank you @qqx that worked
17:00 cdg joined #git
17:00 thebope_ joined #git
17:06 diogenese joined #git
17:06 nexemacs joined #git
17:12 sea-gull joined #git
17:16 borkr joined #git
17:20 dave0x6d joined #git
17:20 dreiss joined #git
17:21 pifon joined #git
17:21 jameser joined #git
17:27 kfoonamalik joined #git
17:28 jstimm joined #git
17:29 ali1234 _ikke_: comm -23 <(git ls-files -co --exclude-standard | sort) <(git ls-files -d | sort)
17:29 modin joined #git
17:29 imack joined #git
17:29 rasto joined #git
17:29 TbobbyZ joined #git
17:30 raijin joined #git
17:30 darkbit joined #git
17:30 ali1234 if i want to see the source of ls-files, where do i look in the git source?
17:30 daynaskully joined #git
17:30 _ikke_ builtin/ls-files.c is a starting point
17:32 portal joined #git
17:32 ali1234 oh, and what even happens if one .gitignore says to ignore another one?
17:32 ali1234 or itself for that matter
17:33 _ikke_ ali1234: git only ignores untracked files
17:33 _ikke_ so as long as it's tracked, it should not matter at all
17:33 ali1234 what if the .gitignore isn't tracked tho
17:34 _ikke_ then git ls-files -c --exclude-standard won't show it
17:34 ali1234 i mean in general
17:34 _ikke_ git does not rely on .gitignore files being tracked
17:34 _ikke_ it just looks at the worktree
17:34 ali1234 okay but what if they are ignored?
17:34 _ikke_ same
17:35 _ikke_ it's still in effect
17:35 ali1234 say .gitignore contains .gitignore and foo
17:35 ali1234 is foo ignored?
17:35 _ikke_ yes
17:35 ali1234 is .gitignore ignored?
17:35 _ikke_ yes
17:35 ali1234 except in the sense of parsing .gitignore
17:35 _ikke_ ignored regarding to git status and git add
17:35 _ikke_ correct
17:35 ali1234 what about if i have foo/.gitignore
17:36 ali1234 is that parsed?
17:36 ankit01ojha joined #git
17:38 pwnz0r joined #git
17:38 Hello71 man gitignore
17:38 gitinfo the gitignore manpage is available at http://jk.gs/gitignore.html
17:39 ali1234 seems like it would be pointless to parse it, since anything in it will already be ignored by the higher level .gitignore
17:39 ali1234 unless you had a line like "../bar" in it
17:39 kexmex joined #git
17:39 ali1234 i don't know if that is even allowed
17:39 orbyt_ joined #git
17:39 _ikke_ no it's not
17:40 _ikke_ just verified it with strace, and foo/.gitignore is never read
17:42 karols146 joined #git
17:44 paul424 joined #git
17:44 manuelschneid3r joined #git
17:44 marianina8 joined #git
17:48 rosiu joined #git
17:49 Aeterne joined #git
17:50 Es0teric joined #git
17:52 ali1234 okay so that brings me to: comm -23 <(git ls-files -co --exclude-standard | sort) <(git ls-files -d | sort) | grep .gitignore$
17:52 ali1234 but that isn't quite right because it will list eg "foo.gitignore" which is not a .gitignore file
17:52 masuberu joined #git
17:53 Starkythefox joined #git
17:54 sarri joined #git
17:54 sarri joined #git
17:54 Gianormagantrous joined #git
17:54 Gianormagantrous joined #git
17:55 Gustavo6046 joined #git
17:55 _ikke_ grep
17:55 _ikke_ grep -E "^.gitignore$"
17:55 ali1234 that won't work
17:56 Starky joined #git
17:56 ali1234 it will fail to match foo/.gitignore
17:58 juandpineiro joined #git
17:58 duderonomy joined #git
17:58 _ikke_ grep -E "(^|/).gitignore$"
17:59 ali1234 your script is now broken on windows
17:59 _ikke_ meh, windows :P
18:00 lmatteis joined #git
18:02 ali1234 what about "strace -e file git status 2>&1 | grep .gitignore"
18:02 Sasazuka joined #git
18:02 ali1234 strace -e file git status 2>&1 | grep .gitignore | cut -d\" -f 2 | sort -u
18:02 ali1234 actually gives me exactly what i want
18:03 bvcosta joined #git
18:07 Cabanossi joined #git
18:08 rorro joined #git
18:13 ertesx joined #git
18:13 MrRicecake joined #git
18:15 Vampire0_ joined #git
18:16 iota_pi joined #git
18:17 TheSimonator joined #git
18:17 Starky joined #git
18:21 ali1234 oh... ** actually does work
18:22 ali1234 so it is just: git ls-files -co --exclude-standard '**/.gitignore'
18:22 vkareh left #git
18:23 vkareh joined #git
18:23 Doginal joined #git
18:25 freddy__ joined #git
18:25 TheSimonator joined #git
18:28 YuGiOhJCJ joined #git
18:36 Silenced_v2 joined #git
18:36 Silenced_v2 joined #git
18:36 cliluw joined #git
18:36 ali1234 hmm i think the globstar implementation is actually bugged
18:39 freddy__ joined #git
18:39 _lvb_ joined #git
18:41 Silenced- joined #git
18:45 freddy___ joined #git
18:46 mizu_no_oto joined #git
18:48 karols146 joined #git
18:49 pandeiro joined #git
18:49 relipse joined #git
18:51 Silenced_v2 joined #git
18:52 justanotheruser joined #git
18:53 t0by joined #git
18:54 ali1234 does anyone have a bleeding edge version of git and can test something for me?
18:57 sbasso joined #git
18:58 qqx ali1234: !ask
18:58 gitinfo ali1234: Yes, it's okay to ask questions here.... in fact, you just asked one! ;-) Pretty much any question is fine. We're not terribly picky, but we might be asleep. Please be patient and you should get an answer soon.
18:58 MattMaker joined #git
18:58 qqx Ehh, not exactly what I was looking for.
18:59 Gustavo6046 joined #git
18:59 ali1234 please go to a clean clone of the git source and run: git ls-files '**/.gitignore'
19:00 ali1234 you should see '.gitignore' (from the top level) in the output
19:00 ali1234 if you don't, it means the bug is not fixed
19:00 henriknj joined #git
19:00 ozcanesen joined #git
19:03 axh joined #git
19:03 _ikke_ ali1234: hold on
19:03 monq joined #git
19:05 ali1234 actually there's an even simpler demonstration: just run: diff <(git ls-files '**/*') <(git ls-files)
19:05 ali1234 the output of these two should be identical, but it is not
19:07 _ikke_ sort order may be different..
19:07 ali1234 okay throw a sort in there :)
19:07 zer0her0 joined #git
19:09 Silenced_v2 joined #git
19:10 _ikke_ Right, it doesn't seem to match files in the main dir
19:10 ali1234 right, ** is matching one or more dirs instead of zero or more dirs like it is supposed to
19:11 qqx That happens even with the tip of the "next" branch.
19:11 ali1234 okay then i am going to send this bug report email
19:11 MrLawrence joined #git
19:12 ter0 joined #git
19:12 MrLawrence Hello, guys whenever I update a repository from another machine and go back to this machine where I did another previous commits and do git status it says the branch is up to date with master, how can that be if a lot of new commits have been pushed into the repository?
19:14 qqx MrLawrence: Which branch are you in and which did you push to?
19:14 MrLawrence qqx, repo has one branch, master
19:14 qqx How did you push to it?
19:15 MrLawrence git push
19:16 qqx No other arguments?
19:16 MrLawrence correct
19:17 _ikke_ ali1234: I'm also looking at it
19:17 MrLawrence the very first time I pushed I believe it was git push -u origin master or something along those lines
19:17 qqx MrLawrence: Did you set it up to allow pushing to the checked-out branch?
19:17 kegster joined #git
19:17 kegster joined #git
19:17 ali1234 _ikke_: i have no idea how to fix it, but i reported it on the ML
19:18 MrLawrence qqx, uh I'm not sure?
19:19 MrLawrence What annoys me is that when I issue git status it says everything is up to date but when I git pull it gets stuff from the repo like oh not really up to date, so obviously I don't understand something
19:19 qqx MrLawrence: What does `git config receive.denyCurrentBranch` output?
19:19 MrLawrence qqx, nothing
19:19 nitric MrLawrence: "git status" doesn't hit the network, it just shows your local status. try a "git fetch" and THEN do a "git status"
19:20 qqx I suspect that you pushed directly to the branch that is checked out, therefore it is up to date. But fetching would still update the remote-tracking branches
19:20 MrLawrence what's the difference between git fetch and git pull
19:20 Dougie187 Pull = fetch + merge
19:21 qqx or rebase instead of merge with some configurations.
19:21 MrLawrence so if I have some delta between current commit and local work and I git pull I get the new stuff but keep my delta?
19:21 dreiss joined #git
19:21 Dougie187 I think it  tells you that it can't merge with a dirty working copy.
19:21 Dougie187 but I could be wrong.
19:22 Dougie187 I know rebase has an autostash argument now at least.
19:22 qqx For merging it only complains if some files with uncommitted changes were also changed by commits that would be merged.
19:23 MrLawrence I thought so, thanks guys
19:23 freddy__ joined #git
19:25 memori joined #git
19:27 thebope_ joined #git
19:28 ter0 joined #git
19:30 _ikke_ ali1234: If I look at the test code, it looks like at least the wildmatch code seems to think '**/*.c' matches foo.c
19:30 daynaskully joined #git
19:31 Gsham joined #git
19:34 davimore joined #git
19:34 bannakaffalatta joined #git
19:35 portal joined #git
19:35 cahoots joined #git
19:35 jimklo joined #git
19:37 eihabarabia joined #git
19:42 sbasso joined #git
19:43 Es0teric joined #git
19:45 Atm0spher1c joined #git
19:46 sbasso joined #git
19:47 Rodya_ joined #git
19:51 Doginal left #git
19:56 griff joined #git
19:56 Micha_Btz left #git
19:58 tnecniv joined #git
19:59 earnestea joined #git
20:04 ZyX-I joined #git
20:04 bronson joined #git
20:04 jstein_ joined #git
20:06 skarm joined #git
20:06 rwp joined #git
20:08 jimklo joined #git
20:13 jimklo joined #git
20:13 theiostream joined #git
20:14 Starky joined #git
20:16 Rodya_ joined #git
20:16 ter0 joined #git
20:17 peterbecich joined #git
20:18 bannakaf_ joined #git
20:18 sbasso joined #git
20:18 EDAKIRI joined #git
20:20 ejd joined #git
20:21 thebope_ joined #git
20:21 maarhart joined #git
20:22 Cabanossi joined #git
20:23 justanotheruser joined #git
20:27 relipse It says my branch is ahead of origin/foobar by 5 commits. How do I see the diff between both
20:27 _ikke_ git diff origin/foobar foobar
20:28 monjwf joined #git
20:29 cagomez joined #git
20:32 loskutak joined #git
20:33 portal__ joined #git
20:33 jimklo joined #git
20:33 jimklo joined #git
20:34 snowalpaca joined #git
20:34 orbyt_ joined #git
20:34 loskutak Hi, I use git to share a project between my laptop and a computing cluster. On each of these, there are some small differences in the code (mainly paths). What is the best way to deal with this kind of setting? I would like to only push the global changes and automatically apply local stuff after a pull. thanks!
20:35 nowhere_man joined #git
20:36 _ikke_ loskutak: Best is to not track these environment specific settings in git
20:37 nedbat loskutak: or keep all the settings in git, and choose among them based on an environment variable.
20:37 Hedgework loskutak: Generally, as _ikke_ said, don't track those settings in git.  However, it's easy to write a deploy script that you then run via a git hook to push stuff to the cluster and apply any config changes.
20:37 loskutak _ikke_: I think that extracting the local stuff would be too much hassle
20:37 Hedgework loskutak: We see scientists all the time who put stuff like credentials in git, too, so don't do that. It makes your repo not safe to share, which kills scientific reproducibility.
20:38 ahrs joined #git
20:38 * Hedgework thinks non-reproducible science isn't science, it's more like screwing around.
20:39 loskutak I thought there is some kind of workflow like having local changes on some branch and then doing some rebasing or stuff like that
20:39 Fallen0223 joined #git
20:40 _ikke_ loskutak: It can be done, but it's a hassle
20:40 Hedgework You can do that, but if you're a git newb it's easy to screw up, and if you're a git veteran, you hate how messy it makes your history because it's hard to follow for people you onboard
20:40 visual joined #git
20:40 visual joined #git
20:41 loskutak Kind of sad :/. Will try to think about some way to extract the local stuff to some file not tracked by git. Thanks for help, everybody!
20:42 Hedgework You're welcome.
20:47 zeroed joined #git
20:48 ali1234 joined #git
20:49 volve joined #git
20:51 volve hey all, I was reading the rebase docs at https://git-scm.com/docs/git-rebase and I got to the example of master, next, and topic - what I want to do is understand how to rebase next off of latest master, and then ensure topic is rebased off of the now updated next (not master, as in the doc example). Unclear how to make that work properly.
20:51 Es0teric joined #git
20:52 Sound joined #git
20:53 sbasso joined #git
20:54 Sound_ joined #git
20:55 ponyofdeath joined #git
20:57 ponyofdeath hi, how can I change the Local branch ref of master to point to master on remote not a feature branch on remote?
20:58 avar git branch --set-upstream-to origin/master
20:59 avar given some "origin" remote name
21:00 ponyofdeath avar: thanks!
21:00 avar So 'git clone --single-branch' clones just the main HEAD, then there's 'git fetch --no-tags`
21:00 avar is there no way to one-shot combine the two? I.e. clone a repo, no tags, just fetch & checkout the main branch..
21:01 tyreld joined #git
21:01 menip joined #git
21:03 adir joined #git
21:07 Cabanossi joined #git
21:10 jeffreylevesque joined #git
21:11 snowalpaca joined #git
21:12 kadoban joined #git
21:13 Imortalk joined #git
21:14 avar AFAICT you need:
21:14 avar (git clone --single-branch <url> <repo> && cd <repo> && git tag -d $(git tag -l) && git config remote.origin.tagOpt --no-tags && git fetch)
21:15 thebope joined #git
21:17 peepsalot joined #git
21:18 jost__ joined #git
21:18 ciroecn joined #git
21:21 adymitruk what's a way to get a tree-ish ref to a tag from head or another ref
21:21 kadoban someref:blah/file/whatever.txt you mean?
21:21 adymitruk ie, I want to get relative refs for each tag before rebasing, then after the rebase, re-tag using thoserefs
21:22 adymitruk no, HEAD^^2~3^^ for v1 , HEAD^^ for v2
21:23 adymitruk once I rebase, I want to force create the same tags on the new commits (or where the originals were rebased to)
21:24 Gustavo6046 joined #git
21:24 MistahKurtz joined #git
21:29 immae adymitruk: Is that what you want? http://stackoverflow.com/a/33537739/414270 Note that your request is not always doable, for instance when you have merged branch "commits" may disappear
21:29 pietv joined #git
21:30 adymitruk ya.. so --preserve-merges is assumed, but also it's probably linear
21:31 Motoko joined #git
21:31 adymitruk so just need to get HEAD^^^ and HEAD~10 etc
21:34 tnecniv joined #git
21:34 webdev007 joined #git
21:38 Ranhir joined #git
21:39 _ikke_ │ AKPWD
21:39 _ikke_ 22:59:02              avar │ given some "origin" remote name                                                                                                                                                                 │ albel727
21:40 shadowx joined #git
21:40 _ikke_ ups, sorry
21:41 shadowx left #git
21:45 shadow-x joined #git
21:54 re1 joined #git
21:58 alexggordon joined #git
22:00 Imortalk joined #git
22:02 sentriz joined #git
22:07 Cabanossi joined #git
22:09 thebope joined #git
22:11 Dougie187 left #git
22:12 bvcosta joined #git
22:16 metachr0n joined #git
22:16 mostlybadfly joined #git
22:20 theoceaniscool_ joined #git
22:22 ToxicFrog joined #git
22:24 preyalone joined #git
22:24 mattcen joined #git
22:27 orbyt_ joined #git
22:27 kfoonamalik joined #git
22:29 cagedwisdom joined #git
22:32 paultreny joined #git
22:33 Guest8057 joined #git
22:38 Husky_Apocalypse joined #git
22:38 re1_ joined #git
22:41 mknod joined #git
22:46 parasite_ joined #git
22:47 askb joined #git
22:48 r0ry joined #git
22:49 durham_ joined #git
22:52 Cabanossi joined #git
23:03 thebope joined #git
23:06 YuGiOhJCJ joined #git
23:06 dirtyroshi joined #git
23:06 rwp joined #git
23:11 druonysus joined #git
23:13 kent\n joined #git
23:15 ddd joined #git
23:15 cagedwisdom joined #git
23:16 ddd left #git
23:17 texasmynsted joined #git
23:22 Cabanossi joined #git
23:23 atomi joined #git
23:23 re1 joined #git
23:26 TbobbyZ joined #git
23:30 madewokherd joined #git
23:32 m0viefreak joined #git
23:37 parasite_ joined #git
23:39 fish3485 joined #git
23:41 justanotheruser joined #git
23:50 axh joined #git
23:51 bronson joined #git
23:52 Cabanossi joined #git
23:52 oghamb joined #git
23:54 lavalamp joined #git
23:55 dave0x6d joined #git
23:57 svm_invictvs joined #git
23:58 thebope joined #git
23:58 MrRicecake joined #git

| Channels | #git index | Today | | Search | Google Search | Plain-Text | summary