[{"data":1,"prerenderedAt":736},["ShallowReactive",2],{"authors":3,"article-2022-01-27-pimp-my-git":331},[4,23,35,48,61,73,85,98,111,124,136,148,161,173,185,197,209,221,233,245,258,270,282,295,307,319],{"id":5,"title":6,"body":7,"description":11,"extension":14,"meta":15,"name":16,"navigation":17,"path":18,"readingTime":19,"seo":20,"stem":21,"__hash__":22},"authors\u002Fauthors\u002Falexandre-guillon.md","Software Engineer",{"type":8,"value":9,"toc":10},"minimark",[],{"title":11,"searchDepth":12,"depth":12,"links":13},"",2,[],"md",{},"Alexandre Guillon",true,"\u002Fauthors\u002Falexandre-guillon",1,{"title":6,"description":11},"authors\u002Falexandre-guillon","4tf48mjyjFNqItOHaulICbrjeCyMag1o6801uHeTz98",{"id":24,"title":6,"body":25,"description":11,"extension":14,"meta":29,"name":30,"navigation":17,"path":31,"readingTime":19,"seo":32,"stem":33,"__hash__":34},"authors\u002Fauthors\u002Falexis-ablain.md",{"type":8,"value":26,"toc":27},[],{"title":11,"searchDepth":12,"depth":12,"links":28},[],{},"Alexis Ablain","\u002Fauthors\u002Falexis-ablain",{"title":6,"description":11},"authors\u002Falexis-ablain","_SIAtB7f-39e5t3GiJof81NP47s6MGo2n4gaHkTy1uQ",{"id":36,"title":37,"body":38,"description":11,"extension":14,"meta":42,"name":43,"navigation":17,"path":44,"readingTime":19,"seo":45,"stem":46,"__hash__":47},"authors\u002Fauthors\u002Faxel-shaita.md","Engineering Manager",{"type":8,"value":39,"toc":40},[],{"title":11,"searchDepth":12,"depth":12,"links":41},[],{},"Axel Shaïta","\u002Fauthors\u002Faxel-shaita",{"title":37,"description":11},"authors\u002Faxel-shaita","fK0argUhsBkWLjpTAhY13oYLVzQthcEYkCEdtHWmIgE",{"id":49,"title":50,"body":51,"description":11,"extension":14,"meta":55,"name":56,"navigation":17,"path":57,"readingTime":19,"seo":58,"stem":59,"__hash__":60},"authors\u002Fauthors\u002Fbaptiste-faure.md","Head of Talent Acquisition",{"type":8,"value":52,"toc":53},[],{"title":11,"searchDepth":12,"depth":12,"links":54},[],{},"Baptiste Faure","\u002Fauthors\u002Fbaptiste-faure",{"title":50,"description":11},"authors\u002Fbaptiste-faure","ELisToYtcgHmgdVWZkCclTPV6exZtfyXqhpx1jjbJHs",{"id":62,"title":6,"body":63,"description":11,"extension":14,"meta":67,"name":68,"navigation":17,"path":69,"readingTime":19,"seo":70,"stem":71,"__hash__":72},"authors\u002Fauthors\u002Fbenjamin-bouillot.md",{"type":8,"value":64,"toc":65},[],{"title":11,"searchDepth":12,"depth":12,"links":66},[],{},"Benjamin Bouillot","\u002Fauthors\u002Fbenjamin-bouillot",{"title":6,"description":11},"authors\u002Fbenjamin-bouillot","tbhCFZyfTt7ZM5b5YgqQ2nhgnSTl8BweaQQryc87fHo",{"id":74,"title":37,"body":75,"description":11,"extension":14,"meta":79,"name":80,"navigation":17,"path":81,"readingTime":19,"seo":82,"stem":83,"__hash__":84},"authors\u002Fauthors\u002Fcedric-nicoloso.md",{"type":8,"value":76,"toc":77},[],{"title":11,"searchDepth":12,"depth":12,"links":78},[],{},"Cédric Nicoloso","\u002Fauthors\u002Fcedric-nicoloso",{"title":37,"description":11},"authors\u002Fcedric-nicoloso","ibSoh4VZYiWYTuLOnZTedaAfcnvet1Q9H7ogW0LgorY",{"id":86,"title":87,"body":88,"description":11,"extension":14,"meta":92,"name":93,"navigation":17,"path":94,"readingTime":19,"seo":95,"stem":96,"__hash__":97},"authors\u002Fauthors\u002Fdavid-touzet.md","Staff Engineer",{"type":8,"value":89,"toc":90},[],{"title":11,"searchDepth":12,"depth":12,"links":91},[],{},"David Touzet","\u002Fauthors\u002Fdavid-touzet",{"title":87,"description":11},"authors\u002Fdavid-touzet","dHWwnQxb1Ubt-WwXWEODGEo9AFoq1cJUhfg3kdnYSBM",{"id":99,"title":100,"body":101,"description":11,"extension":14,"meta":105,"name":106,"navigation":17,"path":107,"readingTime":19,"seo":108,"stem":109,"__hash__":110},"authors\u002Fauthors\u002Feloise-chizat.md","Data Engineer",{"type":8,"value":102,"toc":103},[],{"title":11,"searchDepth":12,"depth":12,"links":104},[],{},"Eloïse Chizat","\u002Fauthors\u002Feloise-chizat",{"title":100,"description":11},"authors\u002Feloise-chizat","Utd72Vm9qT4hh2ZbFi6a2_nXw5Wb494Ed_HL1ra5yw8",{"id":112,"title":113,"body":114,"description":11,"extension":14,"meta":118,"name":119,"navigation":17,"path":120,"readingTime":19,"seo":121,"stem":122,"__hash__":123},"authors\u002Fauthors\u002Femmanuel-auclair.md","Staff engineer",{"type":8,"value":115,"toc":116},[],{"title":11,"searchDepth":12,"depth":12,"links":117},[],{},"Emmanuel Auclair","\u002Fauthors\u002Femmanuel-auclair",{"title":113,"description":11},"authors\u002Femmanuel-auclair","MtsA8THNLEn0dTtYEIQaGwDuf7MjQL55IOeei5gugEg",{"id":125,"title":6,"body":126,"description":11,"extension":14,"meta":130,"name":131,"navigation":17,"path":132,"readingTime":19,"seo":133,"stem":134,"__hash__":135},"authors\u002Fauthors\u002Fhoreb-parraud.md",{"type":8,"value":127,"toc":128},[],{"title":11,"searchDepth":12,"depth":12,"links":129},[],{},"Horeb Parraud","\u002Fauthors\u002Fhoreb-parraud",{"title":6,"description":11},"authors\u002Fhoreb-parraud","ajjsnUX4ohZI-ghMdbb92q_taWDkKXVZSLZXoAeLQtg",{"id":137,"title":37,"body":138,"description":11,"extension":14,"meta":142,"name":143,"navigation":17,"path":144,"readingTime":19,"seo":145,"stem":146,"__hash__":147},"authors\u002Fauthors\u002Fhugo-contreras.md",{"type":8,"value":139,"toc":140},[],{"title":11,"searchDepth":12,"depth":12,"links":141},[],{},"Hugo Contreras","\u002Fauthors\u002Fhugo-contreras",{"title":37,"description":11},"authors\u002Fhugo-contreras","2nc3VMu9ASq9Z6Pwx2-7-Ye991Pww4p-UEDBQFfjF-Q",{"id":149,"title":150,"body":151,"description":11,"extension":14,"meta":155,"name":156,"navigation":17,"path":157,"readingTime":19,"seo":158,"stem":159,"__hash__":160},"authors\u002Fauthors\u002Fjulien-tassin.md","Head of Engineering",{"type":8,"value":152,"toc":153},[],{"title":11,"searchDepth":12,"depth":12,"links":154},[],{},"Julien Tassin","\u002Fauthors\u002Fjulien-tassin",{"title":150,"description":11},"authors\u002Fjulien-tassin","iUIHI7SITje38Jh9X9uvYs4-VsHx4eCdt6hAlyLFG_o",{"id":162,"title":6,"body":163,"description":11,"extension":14,"meta":167,"name":168,"navigation":17,"path":169,"readingTime":19,"seo":170,"stem":171,"__hash__":172},"authors\u002Fauthors\u002Flaurent-renard.md",{"type":8,"value":164,"toc":165},[],{"title":11,"searchDepth":12,"depth":12,"links":166},[],{},"Laurent Renard","\u002Fauthors\u002Flaurent-renard",{"title":6,"description":11},"authors\u002Flaurent-renard","5BP7Ed-pt1SQHjh0UJ1XUrlLTcdlFaDoKBCP4deHq8A",{"id":174,"title":6,"body":175,"description":11,"extension":14,"meta":179,"name":180,"navigation":17,"path":181,"readingTime":19,"seo":182,"stem":183,"__hash__":184},"authors\u002Fauthors\u002Fleo-martin.md",{"type":8,"value":176,"toc":177},[],{"title":11,"searchDepth":12,"depth":12,"links":178},[],{},"Léo Martin","\u002Fauthors\u002Fleo-martin",{"title":6,"description":11},"authors\u002Fleo-martin","eYxCHkRgbGDV7shKdTA9s7Tu0zGV4yDGFoKR5MHQntY",{"id":186,"title":6,"body":187,"description":11,"extension":14,"meta":191,"name":192,"navigation":17,"path":193,"readingTime":19,"seo":194,"stem":195,"__hash__":196},"authors\u002Fauthors\u002Floic-bousquet.md",{"type":8,"value":188,"toc":189},[],{"title":11,"searchDepth":12,"depth":12,"links":190},[],{},"Loïc Bousquet","\u002Fauthors\u002Floic-bousquet",{"title":6,"description":11},"authors\u002Floic-bousquet","ko12qZwiGL8XNjAoy9oWypPkIjr29Pbq7vhdtgldqeQ",{"id":198,"title":6,"body":199,"description":11,"extension":14,"meta":203,"name":204,"navigation":17,"path":205,"readingTime":19,"seo":206,"stem":207,"__hash__":208},"authors\u002Fauthors\u002Floic-poullain.md",{"type":8,"value":200,"toc":201},[],{"title":11,"searchDepth":12,"depth":12,"links":202},[],{},"Loïc Poullain","\u002Fauthors\u002Floic-poullain",{"title":6,"description":11},"authors\u002Floic-poullain","oRIyJhFRTqxy5dLCYQ2OnYZ1DB-gLDUM-85vTSYuTF0",{"id":210,"title":100,"body":211,"description":11,"extension":14,"meta":215,"name":216,"navigation":17,"path":217,"readingTime":19,"seo":218,"stem":219,"__hash__":220},"authors\u002Fauthors\u002Fmaud-lelu.md",{"type":8,"value":212,"toc":213},[],{"title":11,"searchDepth":12,"depth":12,"links":214},[],{},"Maud Lélu","\u002Fauthors\u002Fmaud-lelu",{"title":100,"description":11},"authors\u002Fmaud-lelu","MMbsCKuE41OMHusrl12FIEsI-Trx7l8Nn_ANhvj2_y4",{"id":222,"title":37,"body":223,"description":11,"extension":14,"meta":227,"name":228,"navigation":17,"path":229,"readingTime":19,"seo":230,"stem":231,"__hash__":232},"authors\u002Fauthors\u002Fnicolas-poirier.md",{"type":8,"value":224,"toc":225},[],{"title":11,"searchDepth":12,"depth":12,"links":226},[],{},"Nicolas Poirier","\u002Fauthors\u002Fnicolas-poirier",{"title":37,"description":11},"authors\u002Fnicolas-poirier","dXrJkYo8az4SN_D23aYc3fQ7z8s1dR2a0lt1ogjAjJs",{"id":234,"title":37,"body":235,"description":11,"extension":14,"meta":239,"name":240,"navigation":17,"path":241,"readingTime":19,"seo":242,"stem":243,"__hash__":244},"authors\u002Fauthors\u002Fraphael-sauget.md",{"type":8,"value":236,"toc":237},[],{"title":11,"searchDepth":12,"depth":12,"links":238},[],{},"Raphaël Sauget","\u002Fauthors\u002Fraphael-sauget",{"title":37,"description":11},"authors\u002Fraphael-sauget","Uri9bcq0QDuxRA0PbBoNtu7p_5L3dALu4kzcXVW0xyM",{"id":246,"title":247,"body":248,"description":11,"extension":14,"meta":252,"name":253,"navigation":17,"path":254,"readingTime":19,"seo":255,"stem":256,"__hash__":257},"authors\u002Fauthors\u002Fromain-koenig.md","Co-funder & Head of innovation",{"type":8,"value":249,"toc":250},[],{"title":11,"searchDepth":12,"depth":12,"links":251},[],{},"Romain Koenig","\u002Fauthors\u002Fromain-koenig",{"title":247,"description":11},"authors\u002Fromain-koenig","uyS8--eG2_ezyqRABcJnMJmQKKuSArhPWd14aUvFeEw",{"id":259,"title":37,"body":260,"description":11,"extension":14,"meta":264,"name":265,"navigation":17,"path":266,"readingTime":19,"seo":267,"stem":268,"__hash__":269},"authors\u002Fauthors\u002Fromaric-juniet.md",{"type":8,"value":261,"toc":262},[],{"title":11,"searchDepth":12,"depth":12,"links":263},[],{},"Romaric Juniet","\u002Fauthors\u002Fromaric-juniet",{"title":37,"description":11},"authors\u002Fromaric-juniet","4Zb2artgT-eo-PHLXi3xi4d5t7s6PfhUxeSfXIikSUY",{"id":271,"title":6,"body":272,"description":11,"extension":14,"meta":276,"name":277,"navigation":17,"path":278,"readingTime":19,"seo":279,"stem":280,"__hash__":281},"authors\u002Fauthors\u002Fstanyslas-bres.md",{"type":8,"value":273,"toc":274},[],{"title":11,"searchDepth":12,"depth":12,"links":275},[],{},"Stanyslas Bres","\u002Fauthors\u002Fstanyslas-bres",{"title":6,"description":11},"authors\u002Fstanyslas-bres","Xa0SahETuiN4q1jrmR2ych3moAqcZ2LbU7vSfEt2RuU",{"id":283,"title":284,"body":285,"description":11,"extension":14,"meta":289,"name":290,"navigation":17,"path":291,"readingTime":19,"seo":292,"stem":293,"__hash__":294},"authors\u002Fauthors\u002Ftalent-acquisition.md","Talent Acquisition",{"type":8,"value":286,"toc":287},[],{"title":11,"searchDepth":12,"depth":12,"links":288},[],{},"Équipe Talent Acquisition","\u002Fauthors\u002Ftalent-acquisition",{"description":11},"authors\u002Ftalent-acquisition","doDfE76txftQ4wIiKjJoDmSpyzSKk0tzlgVAp6-opAY",{"id":296,"title":6,"body":297,"description":11,"extension":14,"meta":301,"name":302,"navigation":17,"path":303,"readingTime":19,"seo":304,"stem":305,"__hash__":306},"authors\u002Fauthors\u002Fvictor-borg.md",{"type":8,"value":298,"toc":299},[],{"title":11,"searchDepth":12,"depth":12,"links":300},[],{},"Victor Borg","\u002Fauthors\u002Fvictor-borg",{"title":6,"description":11},"authors\u002Fvictor-borg","-Za-JweoiP6hyclue_WkxMXdRUDTczPGlJf6AZckjUc",{"id":308,"title":6,"body":309,"description":11,"extension":14,"meta":313,"name":314,"navigation":17,"path":315,"readingTime":19,"seo":316,"stem":317,"__hash__":318},"authors\u002Fauthors\u002Fvirgil-roger.md",{"type":8,"value":310,"toc":311},[],{"title":11,"searchDepth":12,"depth":12,"links":312},[],{},"Virgil Roger","\u002Fauthors\u002Fvirgil-roger",{"title":6,"description":11},"authors\u002Fvirgil-roger","DfVFe5j0bCgXeEr381ZYOM5DP4m-pWb93J9-m_muKJ0",{"id":320,"title":6,"body":321,"description":11,"extension":14,"meta":325,"name":326,"navigation":17,"path":327,"readingTime":19,"seo":328,"stem":329,"__hash__":330},"authors\u002Fauthors\u002Fyukan-zhao.md",{"type":8,"value":322,"toc":323},[],{"title":11,"searchDepth":12,"depth":12,"links":324},[],{},"Yukan Zhao","\u002Fauthors\u002Fyukan-zhao",{"title":6,"description":11},"authors\u002Fyukan-zhao","LRPHugtAJnWHsmHxy9_SR5Zas_C5p-GR_uHEs1Fhk_E",{"id":332,"title":333,"author":334,"body":335,"date":725,"description":726,"extension":14,"lang":727,"meta":728,"navigation":17,"path":729,"published":17,"readingTime":730,"seo":731,"stem":732,"tags":733,"__hash__":735},"articles\u002Farticles\u002F2022-01-27-pimp-my-git.md","Pimp my Git","emmanuel-auclair",{"type":8,"value":336,"toc":717},[337,341,344,347,367,378,381,395,398,401,407,410,413,420,425,428,435,473,476,491,494,500,515,519,522,525,540,543,552,555,564,567,576,579,584,591,599,606,609,612,618,629,632,635,641,644,647,653,662,666,669,672,675,678,684,688,691,694,707,710,713],[338,339,340],"p",{},"Git has become almost unavoidable when you work as a dev today.",[338,342,343],{},"Git is a pretty awesome tool in my opinion, that has never let me down during the past 10 years.\n(Really. The thing. Just. Works. Kudos to the developers and maintainers because not all our\ndevtools achieve this over 10 years).",[338,345,346],{},"Git, however, has one big drawback in everyday use (some people find a lot of other, more\nphilosophical drawbacks): the User Interface sucks.",[338,348,349,350,354,355,358,359,362,363,366],{},"I’ve been spending the last 10 years trying to explain to junior developers or even non-developers\nstaff, the subtile differences between ",[351,352,353],"code",{},"checkout"," and ",[351,356,357],{},"reset"," and when to use one or the other. How\n",[351,360,361],{},"rebase"," works. Don’t get me started on ",[351,364,365],{},"submodule",".",[338,368,369,370,373,374,377],{},"Basic everyday operations like unstaging or discarding changes, used to require remembering commands\nlike ",[351,371,372],{},"git reset HEAD"," or ",[351,375,376],{},"git checkout -- \u003Cfile>",", both used for totally different operation like\nchanging the working branch or undoing commit…",[338,379,380],{},"There are two things that have really helped me “grok” and become more fluent in Git:",[338,382,383,394],{},[384,385,386,387],"strong",{},"1\u002F reading ",[388,389,393],"a",{"href":390,"rel":391},"https:\u002F\u002Fgit-scm.com\u002Fbook\u002Fen\u002Fv2",[392],"nofollow","Pro Git"," by Scott Chacon and Ben Straub",[338,396,397],{},"(available for free, but it’s so good I bought 2 paper versions). It really explains the working\nmodels of Git perfectly, and how to build your own mental model to use it, and to understand what\nyou’re doing.",[338,399,400],{},"The book uses nice, well-thought-out pictures and diagrams to explain each concept. Still a\nreference after all those years, and one of the best reading investments I’ve done in my carrier.",[338,402,403,406],{},[384,404,405],{},"2\u002F customizing Git with my own configuration",",",[338,408,409],{},"Basically building my own User Interface, with my daily used commands perfectly setup for my current\nworkflow.",[338,411,412],{},"What started as a way to improve my Git experience ended up in exploring the config of other Git\nusers to learn more tricks with my favorite tool.",[338,414,415,416,419],{},"You just need to edit you Git config file (usually ",[351,417,418],{},"~\u002F.gitconfig",") to start improving your Git\nexperience.",[421,422,424],"h2",{"id":423},"config-options","Config options",[338,426,427],{},"The first way to customize Git is just to configure some of its many options.",[338,429,430,431,434],{},"Some are quite basics, like changing the colors for the different status of files in ",[351,432,433],{},"git status","\noutput:",[436,437,441],"pre",{"className":438,"code":439,"language":440,"meta":11,"style":11},"language-conf shiki shiki-themes github-light github-dark","[color \"status\"]\n  added = green\n  changed = red\n  untracked = cyan\n  unmerged = magenta\n","conf",[351,442,443,450,455,461,467],{"__ignoreMap":11},[444,445,447],"span",{"class":446,"line":19},"line",[444,448,449],{},"[color \"status\"]\n",[444,451,452],{"class":446,"line":12},[444,453,454],{},"  added = green\n",[444,456,458],{"class":446,"line":457},3,[444,459,460],{},"  changed = red\n",[444,462,464],{"class":446,"line":463},4,[444,465,466],{},"  untracked = cyan\n",[444,468,470],{"class":446,"line":469},5,[444,471,472],{},"  unmerged = magenta\n",[338,474,475],{},"Other options allow you to define the tools you want to use with Git, like which merge tool to use\nto resolve conflicts:",[436,477,479],{"className":438,"code":478,"language":440,"meta":11,"style":11},"[merge]\n  tool = kdiff3\n",[351,480,481,486],{"__ignoreMap":11},[444,482,483],{"class":446,"line":19},[444,484,485],{},"[merge]\n",[444,487,488],{"class":446,"line":12},[444,489,490],{},"  tool = kdiff3\n",[338,492,493],{},"Finally, the more interesting options can change the default behaviour of some of the most used Git\ncommand.",[338,495,496,497,499],{},"For example, you can configure ",[351,498,361],{}," to auto-stash your local modifications before starting the\nrebasing process, and auto-pop them once you’re done, allowing you to easily rebase your working\narea on main without worry.",[436,501,503],{"className":438,"code":502,"language":440,"meta":11,"style":11},"[rebase]\n  autostash = true\n",[351,504,505,510],{"__ignoreMap":11},[444,506,507],{"class":446,"line":19},[444,508,509],{},"[rebase]\n",[444,511,512],{"class":446,"line":12},[444,513,514],{},"  autostash = true\n",[421,516,518],{"id":517},"git-aliases","Git aliases",[338,520,521],{},"The other way to improve your Git user experience is to use aliases to define your own new Git\ncommands.",[338,523,524],{},"This can be used to shorten commands that you’ll type hundreds of time every day.",[436,526,528],{"className":438,"code":527,"language":440,"meta":11,"style":11},"[alias]\n  s = status\n",[351,529,530,535],{"__ignoreMap":11},[444,531,532],{"class":446,"line":19},[444,533,534],{},"[alias]\n",[444,536,537],{"class":446,"line":12},[444,538,539],{},"  s = status\n",[338,541,542],{},"Or to enable some flags by default. Let’s say you want your diff to ignore all space modifications\nby default:",[436,544,546],{"className":438,"code":545,"language":440,"meta":11,"style":11},"d = diff --ignore-all-space\n",[351,547,548],{"__ignoreMap":11},[444,549,550],{"class":446,"line":19},[444,551,545],{},[338,553,554],{},"In those simple cases, the command you want to execute with your alias is another Git command so you\njust need to write the command and its flags without any particular syntax.",[436,556,558],{"className":438,"code":557,"language":440,"meta":11,"style":11},"my-alias = \u003Cgit cmd> [...flags]\n",[351,559,560],{"__ignoreMap":11},[444,561,562],{"class":446,"line":19},[444,563,557],{},[338,565,566],{},"Then you’ll be able to invoke you alias as you would any other Git command.",[436,568,570],{"className":438,"code":569,"language":440,"meta":11,"style":11},"git my-alias\n",[351,571,572],{"__ignoreMap":11},[444,573,574],{"class":446,"line":19},[444,575,569],{},[338,577,578],{},"And Git will automatically substitute your alias with the command specified.",[580,581,583],"h3",{"id":582},"invoking-shell-commands","Invoking shell commands",[338,585,586,587,590],{},"You can, in fact, execute any command with a Git alias, including non-git commands. You’ll however\nneed to prefix those commands with ",[351,588,589],{},"!"," to denote external commands, and usually you’ll also have to\nwrap them in double quotes.",[436,592,597],{"className":593,"code":595,"language":596},[594],"language-text","hello = \"!echo 'hello'\"\n","text",[351,598,595],{"__ignoreMap":11},[338,600,601,602,605],{},"Typing ",[351,603,604],{},"git hello"," will simply print “hello” in your shell.",[338,607,608],{},"This really unlocks the power of the Git aliases, allowing you to do some really convenient stuff.",[338,610,611],{},"Like invoking external tools:",[436,613,616],{"className":614,"code":615,"language":596},[594],"ignore = \"!gi() { curl -L -s \u003Chttps:\u002F\u002Fwww.gitignore.io\u002Fapi\u002F$@> ;}; gi\"\n",[351,617,615],{"__ignoreMap":11},[338,619,620,621,624,625,628],{},"Now by typing ",[351,622,623],{},"git ignore node"," you’ll get a default ",[351,626,627],{},".gitignore"," file for Node projects.",[338,630,631],{},"(Note the use of an inline shell function to include in the URL, the arguments you pass to your Git\nalias).",[338,633,634],{},"You can also chain Git commands.",[436,636,639],{"className":637,"code":638,"language":596},[594],"addrm = \"!git rm $(git ls-files --deleted)\"\n",[351,640,638],{"__ignoreMap":11},[338,642,643],{},"This alias will stage all the deleted files in your working area.",[338,645,646],{},"Finally, this syntax can be used to invoke other Git aliases. You can normally not define an alias\nusing another alias directly, but by executing another Git process to launch the alias, you can\nachieve the same result.",[436,648,651],{"className":649,"code":650,"language":596},[594],"di = diff --color-words\ndiff-staged = \"!git di --cached\"\n",[351,652,650],{"__ignoreMap":11},[338,654,655,658,659,366],{},[351,656,657],{},"git diff-staged"," will show you the diff between HEAD and your staging area (aka index), what would\nbe committed by ",[351,660,661],{},"git commit",[421,663,665],{"id":664},"building-your-own-configuration","Building your own configuration",[338,667,668],{},"My own advice would be to build your own configuration incrementally.",[338,670,671],{},"Avoid adding a lot of aliases or options at once, since you’ll then struggle to become familiar with\nthem all. Start small and add just a few aliases for your most used commands in your everyday flow.",[338,673,674],{},"You can also dedicate a section of your config to the cools tricks you found along the way, that you\nwon’t use every day.",[338,676,677],{},"When you want to see your aliases you can use",[436,679,682],{"className":680,"code":681,"language":596},[594],"alias = \"!git config -l | grep alias | cut -c 7-\"\n",[351,683,681],{"__ignoreMap":11},[421,685,687],{"id":686},"conclusion","Conclusion",[338,689,690],{},"Using the Git configuration file you can totally customize your Git experience.",[338,692,693],{},"Many developers have been building their own configuration files over the years, and publish them\nonline on sites like Github. Reading those files is probably the best way to learn new tricks and to\ndiscover the rich configuration options available.",[338,695,696,697,699,700,703,704,706],{},"I should also mention that Git user interface is gradually and steadily improving with each new\nversion. This started with adding useful command reminders in the output of ",[351,698,433],{}," command and\nthe like. And today new commands are added like ",[351,701,702],{},"git restore"," to avoid using unrelated commands like\n",[351,705,353],{}," to unstage or discard your modifications.",[338,708,709],{},"While old users like me will probably keep using their time-honed aliases in their daily flow, hats\noff to the Git developers and maintainers that keep working to improve the experience of new or\nnon-technical users.",[338,711,712],{},"Now go forth and pimp your Git.",[714,715,716],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":11,"searchDepth":12,"depth":12,"links":718},[719,720,723,724],{"id":423,"depth":12,"text":424},{"id":517,"depth":12,"text":518,"children":721},[722],{"id":582,"depth":457,"text":583},{"id":664,"depth":12,"text":665},{"id":686,"depth":12,"text":687},"2022-01-27","Git has become almost unavoidable when you work as a dev today. Git is a pretty awesome tool in my opinion, that has never let me down during the past 10 years","en",{},"\u002Farticles\u002F2022-01-27-pimp-my-git",7,{"title":333,"description":726},"articles\u002F2022-01-27-pimp-my-git",[734],"Tech","NmOeXO5NFzQlkxTwhKmPohrLyEpfjZo6eBrZJUwKX90",1778159244299]