[{"data":1,"prerenderedAt":353},["ShallowReactive",2],{"project-25069350":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":43,"post_text":46,"what":47,"said":73,"maker_in_thread":160,"shape":169,"grid":173,"attempts":316,"same_week":317,"maker_shows":33,"maker_hidden":345,"reader_version":346,"card":347},"25069350","Git-User-Switch","Switch Git Users CLI","title","Show HN: Switch Git Users CLI","https:\u002F\u002Fgithub.com\u002Fgeongeorge\u002FGit-User-Switch","github.com","geongeorgek",1605185970,2020,140,57,437,3028,15,"notable","dev_tools","git identity switcher","cli",[24,25,26,27],"git user","git identity","git config","switch git user","curious",-0.239,{"positive":31,"neutral":32,"mixed":33,"critical":34},4,18,2,10,34,{"idea":37,"execution":38,"design":40,"performance":41},{"positive":33,"critical":31},{"positive":39,"critical":31},1,{"positive":39,"critical":39},{"positive":42,"critical":39},0,[44,44,44,45,45,44,44,44,42,42,42,44,44,44,44,45,39,42,42,44,44,42,42,39,42,39,42,44,44,39,39,42,45,39,44,39,39,44,42,39],3,5,null,{"problem":48,"audience":46,"pricing":46,"motivation":55,"time_to_build":46,"stack":59,"openness":72,"stage":72,"team_size":72},{"value":49,"source":50,"evidence":51},"Switching between multiple git user names and emails for different clients or work","maker",[52],{"id":53,"by":11,"text":54},"25069371","Author here! I'm a freelancer working for multiple agencies at the moment. And One of the requirements was that I use the agency email for all commits. So I made this as a sugar…",{"value":56,"source":50,"evidence":57},"Freelancer needing agency email on all commits",[58],{"id":53,"by":11,"text":54},[60],{"value":61,"source":62,"evidence":63},"Node.js","commenter",[64,68],{"id":65,"by":66,"text":67},"25070161","enriquto","What's the point of writing this simple tool in js? I'd like to use it but I don't have npm everywhere (and I don't want to grab a huge tree of dependencies just for editing a…",{"id":69,"by":70,"text":71},"25069940","Icyphox","Could've been written in a 30–40 line shell script, heh.","unknown",{"praise":74,"objections":90,"requests":110,"questions":125,"alternatives":126},[75],{"value":76,"source":62,"evidence":77},"Git conditional includes or per-repo config are simpler alternatives",[78,82,86],{"id":79,"by":80,"text":81},"25069821","Foxboron","https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgit-config#_conditional_includes Is a lot easier then what you came up with.",{"id":83,"by":84,"text":85},"25069835","pavlo","This is a great looking tool. What I have been doing by hand for some time is putting code for different customers in different directories and having a conditional in…",{"id":87,"by":88,"text":89},"25069911","zachrip","Looks neat, but I agree with others about using conditional includes instead. Perhaps this tool could build on that?",[91,102],{"value":92,"source":62,"evidence":93},"Pulls in a large npm dependency tree for a small script",[94,98,101],{"id":95,"by":96,"text":97},"25072300","miguelmota","This package installed 47.4MiB of node_modules. Yikes.",{"id":99,"by":80,"text":100},"25069789","A 1000 line YARN lock file for something that would be roughly 20 lines of bash is amazing and terrifying at the same time.",{"id":65,"by":66,"text":67},{"value":103,"source":62,"evidence":104},"Could be written as a short shell script",[105,106],{"id":69,"by":70,"text":71},{"id":107,"by":108,"text":109},"25070658","cdubzzz","Let’s see the 20 lines of bash that replicate all the features of this utility. Should fit in an HN comment nicely.",[111,118],{"value":112,"source":62,"evidence":113},"Add signingKey support",[114],{"id":115,"by":116,"text":117},"25069905","oefrha","Without using include in gitconfig: ``` #!\u002Fusr\u002Fbin\u002Fenv zsh case $1 in foo) git config user.name 'John Doe' git config user.email john@example.com git config user.signingKey…",{"value":119,"source":62,"evidence":120},"Centralized data file instead of per-project data.json",[121],{"id":122,"by":123,"text":124},"25070948","SparkyMcUnicorn","This line makes it not very useful, because I have to re-add accounts for each project. ``` const store = require(\"data-store\")({ path: process.cwd() + \"\u002Fdata.json\" }); ``` I…",[],[127,135,142,153],{"value":128,"source":62,"evidence":129},"git includeIf conditional includes",[130,131],{"id":83,"by":84,"text":85},{"id":132,"by":133,"text":134},"25072302","augusto-moura","Git has conditional includes based on path[1]. My configuration is like: On ~\u002F.gitconfig ``` [user] name = personal email = personal@example.com [includeIF \"gitdir:~\u002Fworkspace\u002F\"]…",{"value":136,"source":62,"evidence":137},"karn",[138],{"id":139,"by":140,"text":141},"25071800","mr-karan","I currently use [karn](https:\u002F\u002Fgithub.com\u002Fprydonius\u002Fkarn) to manage multiple `git` identities. Works pretty nice.",{"value":143,"source":62,"evidence":144},"deepsource git profiles \u002F git-profile",[145,149],{"id":146,"by":147,"text":148},"25069819","archseer","git has a similar feature built in: https:\u002F\u002Fdeepsource.io\u002Fblog\u002Fmanaging-different-git-profiles\u002F",{"id":150,"by":151,"text":152},"25071184","KuiN","Have seen more than a few attempts to solve this problem. Here's my version[0] and there's many more on GitHub. Wonder if there's an opportunity to unify our efforts & get…",{"value":154,"source":62,"evidence":155},"direnv with GIT_AUTHOR_EMAIL",[156],{"id":157,"by":158,"text":159},"25070829","0xEFF","I find it much easier to use direnv and set GIT_AUTHOR_EMAIL in each of ~\u002Fwork\u002F.envrc and ~\u002Fpersonal\u002F.envrc No need to reconfigure every repo this way.",{"comments":44,"answered":42,"key":161},[162,165,166],{"id":163,"text":164},"25070342","Thanks for sharing this. This was what I was missing. Should've done proper research before building. I'd still think the cli could be useful in some situations. but I agree with…",{"id":53,"text":54},{"id":167,"text":168},"25070079","Thanks. This is perfect but I also like the convenience of a quick switcher for any folder.",{"commenters":170,"max_depth":171,"maker_replies":44,"first_comment_mins":33,"lifespan_hours":172},39,7,79,[174,178,179,183,184,188,192,195,199,202,205,207,209,211,213,215,218,221,224,226,229,231,234,237,239,242,243,246,248,250,252,254,257,259,261,264,265,267,270,271,274,278,280,282,284,286,289,293,297,298,301,303,304,306,309,312,314],[175,42,44,176,177,42],"25070300","project\u002Fneutral\u002Fidea","varl",[157,42,44,176,158,42],[180,42,42,181,182,42],"25071632","commenter\u002Fneutral\u002Fnone","cbcoutinho",[132,42,44,176,133,42],[185,42,45,186,187,42],"25074141","project\u002Fpositive\u002Fidea","grenoire",[189,42,44,190,191,42],"25075234","project\u002Fneutral\u002Fexecution","lilyball",[193,42,45,186,194,42],"25071028","diegoholiveira",[196,42,44,197,198,42],"25071233","project\u002Fneutral\u002Fnone","gioele",[200,42,44,176,201,42],"25072775","corytheboyd",[203,42,44,190,204,42],"25072918","jolmg",[206,42,42,181,177,42],"25073233",[208,42,42,181,204,42],"25074615",[210,42,42,181,177,42],"25075346",[212,42,42,181,191,42],"25075491",[214,42,42,181,204,42],"25076226",[216,42,42,217,191,42],"25104492","other\u002Fneutral\u002Fnone",[219,42,44,190,220,42],"25074289","gumby",[222,42,44,190,223,42],"25076945","Ajedi32",[83,39,44,225,84,42],"project\u002Fmixed\u002Fidea",[227,39,44,225,228,42],"25069896","diggan",[163,39,42,230,11,39],"maker\u002Fneutral\u002Fidea",[232,39,45,233,84,42],"25070941","project\u002Fpositive\u002Fdesign",[235,39,44,176,236,42],"25071467","gru",[99,33,39,238,80,42],"project\u002Fcritical\u002Fexecution",[240,33,42,181,241,42],"25070644","gnagatomo",[107,33,42,181,108,42],[244,33,42,181,245,42],"25070988","boogies",[247,33,44,176,108,42],"25071197",[249,33,44,190,80,42],"25071477",[251,33,42,181,108,42],"25071825",[253,33,42,181,245,42],"25072127",[255,33,42,181,256,42],"25072163","NateEag",[258,33,42,181,108,42],"25073700",[260,33,39,238,80,42],"25072161",[262,33,42,217,263,42],"25071652","lprd",[115,44,44,190,116,42],[146,31,39,266,147,42],"project\u002Fcritical\u002Fidea",[268,31,42,217,269,42],"25071484","andreineculau",[139,45,44,176,140,42],[272,45,42,217,273,42],"25074231","captn3m0",[275,276,44,176,277,42],"25090738",6,"gurjeet",[95,171,39,279,96,42],"project\u002Fcritical\u002Fperformance",[65,281,39,238,66,42],8,[283,281,44,176,108,42],"25070815",[285,281,42,181,66,42],"25071255",[287,281,42,181,288,42],"25073761","benmller313",[290,281,45,291,292,42],"25071970","project\u002Fpositive\u002Fexecution","maple3142",[294,295,39,266,296,42],"25073847",9,"29athrowaway",[150,34,44,176,151,42],[122,299,39,300,123,42],11,"project\u002Fcritical\u002Fdesign",[53,302,42,230,11,39],12,[79,302,39,266,80,42],[167,302,42,305,11,39],"maker\u002Fpositive\u002Fidea",[307,302,44,176,308,42],"25070761","JimDabell",[310,302,42,181,311,42],"25078134","edoceo",[87,313,39,266,88,42],13,[69,315,39,238,70,42],14,[],[318,323,327,332,337,341],{"id":319,"name":320,"points":321,"category":322},"25088683","Stargate (Dwitter 20584)",377,"creative",{"id":324,"name":325,"points":326,"category":20},"25110879","gh-pages-url-shortener",355,{"id":328,"name":329,"points":330,"category":331},"25099847","LibreASR",233,"ai",{"id":333,"name":334,"points":335,"category":336},"25139833","Podcast API",223,"data",{"id":338,"name":339,"points":340,"category":322},"25071643","dosylogo",174,{"id":342,"name":343,"points":344,"category":20},"25138872","Scratch.js",169,false,"v2",{"id":348,"name":5,"line":6,"ai":345,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":349,"top":18,"kw":350,"maker":11,"domain":10,"tier":19,"attempts":42,"strip":351,"url":9,"mix":352,"praise":76,"objection":92,"sub":21},25069350,-0.24,[24,25,26,27],"3335533300033335100330010103311051311301",[31,32,33,34],1794036598315]