PageSourceSearch

https://varya.me/component---src-templates-post-js-content-file-pa…ple-emails-index-md-492934257ab3eca222c5.js

js varya.me collected 2026-09-24 10:33:02 UTC 15,604 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkvarya_me=self.webpackChunkvarya_me||[]).push([[108],{246:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var a=n(8453),i=n(6540);function o(e){const t=Object.assign({p:"p",span:"span",h3:"h3",a:"a",ol:"ol",li:"li",strong:"strong"},(0,a.RP)(),e.components);return i.createElement(i.Fragment,null,i.createElement("div",{"data-excerpt":!0},i.createElement(t.p,null,"In the digital age, effective collaboration is the backbone of any successful project. Whether you're an in-house team member or an external consultant, integrating your workflow with the company's systems and protocols is not just beneficial—it's essential. Today, I dive into a common yet often overlooked aspect of project collaboration: using a company-specific email with your existing GitHub account. This seemingly small step can significantly streamline communication and project tracking, ensuring that your commits are signed correctly and that notifications reach you through the appropriate channels.")),"\n",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<span\n      class="gatsby-resp-image-wrapper"\n      style="position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1600px; width: 100%;"\n    >\n      <a\n    class="gatsby-resp-image-link"\n    href="/static/b62148bd99e3cc0ae3ef04b57068a9a7/8b619/cover.jpg"\n    style="display: block"\n    target="_blank"\n    rel="noopener"\n  >\n    <span\n    class="gatsby-resp-image-background-image"\n    style="padding-bottom: 66.25%; position: relative; bottom: 0; left: 0; background-image: url(\'data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAIBBf/EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAwDAQACEAMQAAAB5mzWpIP/xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAEFAl//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Al//xAAYEAACAwAAAAAAAAAAAAAAAAABEAAxQf/aAAgBAQABPyEXC8X/2gAMAwEAAgADAAAAEGgP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGhABAQADAQEAAAAAAAAAAAAAAQARIVExQf/aAAgBAQABPxBYp6MjzF8LaNzp9v/Z\'); background-size: cover; display: block;"\n  ></span>\n  <img\n        class="gatsby-resp-image-image"\n        alt="cover"\n        title=""\n        src="/static/b62148bd99e3cc0ae3ef04b57068a9a7/b17f8/cover.jpg"\n        srcset="/static/b62148bd99e3cc0ae3ef04b57068a9a7/066f9/cover.jpg 400w,\n/static/b62148bd99e3cc0ae3ef04b57068a9a7/4b190/cover.jpg 800w,\n/static/b62148bd99e3cc0ae3ef04b57068a9a7/b17f8/cover.jpg 1600w,\n/static/b62148bd99e3cc0ae3ef04b57068a9a7/df51d/cover.jpg 2400w,\n/static/b62148bd99e3cc0ae3ef04b57068a9a7/01fc7/cover.jpg 3200w,\n/static/b62148bd99e3cc0ae3ef04b57068a9a7/8b619/cover.jpg 5000w"\n        sizes="(max-width: 1600px) 100vw, 1600px"\n        style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;"\n        loading="lazy"\n        decoding="async"\n      />\n  </a>\n    </span>'}}),"\n",i.createElement(t.h3,{id:"why-use-a-company-email-with-github",style:{position:"relative"}},i.createElement(t.a,{href:"#why-use-a-company-email-with-github","aria-label":"why use a company email with github permalink",className:"anchor before"},i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Why Use a Company Email with GitHub?"),"\n",i.createElement(t.p,null,"Imagine you're working on a project for a company. To maintain a unified front and ensure seamless collaboration, it's practical to use an email address under the company's domain for all project-related correspondence. It is also logical to sign your commits with the company email.\nHowever, the thought of managing multiple GitHub accounts or juggling between different email addresses might be daunting. Fortunately, GitHub and Git offer a solution that allows you to link a company email to your personal account, eliminating the need for separate accounts and simplifying your workflow."),"\n",i.createElement(t.h3,{id:"setting-the-stage-add-your-company-email-to-github",style:{position:"relative"}}
1,i.createElement(t.a,{href:"#setting-the-stage-add-your-company-email-to-github","aria-label":"setting the stage add your company email to github permalink",className:"anchor before"},i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Setting the Stage: Add Your Company Email to GitHub"),"\n",i.createElement(t.p,null,"The first step is to add your company email to your GitHub account. This can be done effortlessly by navigating to ",i.createElement(t.a,{href:"https://github.com/settings/emails"},"GitHub's email settings page"),". Adding your company email here not only associates it with your account but also allows you to select it as the primary email for specific repositories or organizations."),"\n",i.createElement(t.h3,{id:"fine-tuning-notifications-route-them-wisely",style:{position:"relative"}},i.createElement(t.a,{href:"#fine-tuning-notifications-route-them-wisely","aria-label":"fine tuning notifications route them wisely permalink",className:"anchor before"},i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Fine-Tuning Notifications: Route Them Wisely"),"\n",i.createElement(t.p,null,"With your company email added, the next step is to ensure that notifications from the company's organization on GitHub are directed to this email. This can be configured in the ",i.createElement(t.a,{href:"https://github.com/settings/notifications/custom_routing"},"custom routing section of the GitHub notifications settings"),". With this setting, you won't miss an important update when monitoring your\ncorporate email. At the same time, you won't be disturbed with notifications in your spare time\nand while on vacations."),"\n",i.createElement(t.h3,{id:"tailoring-git-configurations-for-project-specific-committing",style:{position:"relative"}},i.createElement(t.a,{href:"#tailoring-git-configurations-for-project-specific-committing","aria-label":"tailoring git configurations for project specific committing permalink",className:"anchor before"},i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Tailoring Git Configurations for Project-Specific Committing"),"\n",i.createElement(t.p,null,"Now, let's tackle a common challenge: ensuring that commits to company projects use your company email, without altering your global Git settings. The solution lies in conditional configuration within Git, which allows you to specify different user information for various projects."),"\n",i.createElement(t.p,null,"For someone like me, who juggles multiple projects as a consultant, having conditional Git settings is crucial. However, even if you're an in-house developer who has been with the same company for many years, you might still engage in personal side projects or volunteer as a developer for a non-profit. It makes sense to sign off on those projects with your personal email or perhaps even a nickname."),"\n",i.createElement(t.ol,null,"\n",i.createElement(t.li,null,"\n",i.createElement(t.p,null,i.createElement(t.strong,null,"Conditional Includes in ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">.gitconfig</code>'}}),":")," Begin by editing your global ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">~/.gitconfig</code>'}})," file to include conditional paths for different projects. This looks something like this:"),"\n",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="text"><pre class="language-text"><code class="language-text">
1[includeIf "gitdir:~/WebDev/Project1/"]\n  path = ~/WebDev/Project1/.gitconfig\n[includeIf "gitdir:~/WebDev/Project2/"]\n  path = ~/WebDev/Project2/.gitconfig</code></pre></div>'}}),"\n",i.createElement(t.p,null,"This setup tells Git to use a specific configuration file for commits made within the ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">Project1</code>'}})," or ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">Project2</code>'}})," directories. Ensure that this conditional include is placed after your global username and email settings."),"\n"),"\n",i.createElement(t.li,null,"\n",i.createElement(t.p,null,i.createElement(t.strong,null,"Creating a Local Config File:")," For each project, create a local ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">.gitconfig</code>'}})," file (e.g., ",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">~/WebDev/Project2/.gitconfig</code>'}}),") and specify the company email as follows:"),"\n",i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="text"><pre class="language-text"><code class="language-text">[user]\n  email = [email protected]</code></pre></div>'}}),"\n",i.createElement(t.p,null,"This setup ensures that any commits made within the project directory will automatically use the specified company email, keeping your contributions aligned with the company's identity."),"\n"),"\n"),"\n",i.createElement(t.h3,{id:"all-set",style:{position:"relative"}},i.createElement(t.a,{href:"#all-set","aria-label":"all set permalink",className:"anchor before"},i.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"All Set!"),"\n",i.createElement(t.p,null,"Using your company email with your GitHub account and configuring Git appropriately simplifies collaboration and ensures your contributions are properly attributed. This method streamlines notifications and keeps your work organized, allowing you to focus on what matters without mixing personal and professional communications. It's a straightforward yet effective way to enhance your project involvement and efficiency."),"\n",i.createElement(t.p,null,"Cover photo by ",i.createElement("a",{href:"https://unsplash.com/@yancymin?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash"},"Yancy Min")," on ",i.createElement("a",{href:"https://unsplash.com/photos/a-close-up-of-a-text-description-on-a-computer-screen-842ofHC6MaI?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash"},"Unsplash")))}var r=function(e={}){const{wrapper:t}=Object.assign({},(0,a.RP)(),e.components);return t?i.createElement(t,e,i.createElement(o,e)):o(e)},l=n(5556),s=n.n(l),c=n(3433),m=n(9868),A=n(7037),u=n(3928),g=n(4449);const h={Box:c.a,Button:m.$,Text:A.E,Heading:u.DZ,Paragraph:u.fz,PatternJourney:u.Rl,PureHtml:u.Qi,Section:u.wn,Hero:u.lq,Widget:u.x0,PatternJourney:u.Rl,WidgetContainer:u.uM,Workshop:u.cR,ProjectRoles:u.JV,DsAspects:u.nD,Link:u.N_,Image:u._V,ImageBlock:u.Dq,Map:u.T5,YandexImage:u.zX,Instagram:u.pd},d=e=>({children:t})=>i.createElement(u.DZ,{level:e},t),p={h1:d(1),h2:d(2),h3:d(3),h4:d(4),h5:d(5),h6:d(6),p:({children:e})=>i.createElement(u.fz,{standout:!0},e),a:u.N_,ul:u.Ul,ol:u.Ol,div:({"data-excerpt":e,children:t,...n})=>e?i.createElement(u.fz,{as:"div",lead:!0},t):i.createElement("div",n,t)};p.h1.propTypes={children:s().node};const f=({data:{mdx:e,site:{siteMetadata:{siteUrl:t}}},children:n,pageContext:{next:o,prev:r,fileSourceUrl:l}})=>{const{readingTime:s,slug:m,disqusIdentifier:A}=e.fields,{date:d,title:f,subTitle:y,cover:b,tumblr:E}=e.frontmatter,v=e.frontmatter.tags&&e.frontmatter.tags.split(","),w=m.startsWith("blog/");return e?i.createElement(u.PE,null,i.createElement(u.I0,{imageUrl:b&&b.childImageSharp.gatsbyImageData.images.fallback.src,tags:v,date:d,readingTime:w&&parseInt(s.minutes)>0?`${Math.round(s.minutes).toFixed(1)} min read`:null,title:f,subTitle:y}),i.createElement(u.G$,{data:e}),i.createElement(c.a,{flex:"grow",width:"xlarge",margin:{horizontal:"auto"},pad:"medium",direction:"column"},i.createElement(a.xA,{components:{...p,...h}},n),i.createElement(c.a,{direction:"row",fill:"horizontal",justify:"center",margin:{bottom:"auto"},pad:{vertical:"medium"}},v&&v.length>0&&v.map(e=>i.createElement(u.vw,{key:e,name:e.trim(),slug:(0,g.fX)(e),margin:"xsmall"}))),w&&i.createElement(i.Fragment,null,i.createElement(u.WB,{flex:!1,prevSlug:r&&`/${r.fields.slug}`,nextSlug:o&&`/${o.fields.slug}`,prevTitle:r&&r.frontmatter.title,nextTitle:o&&o.frontmatter.title,pad:{vertical:"medium"}}),i.createElement(u.Sn,{link:l}),i.createElement(u.Hw,{slug:m,title:f,disqusIdentifier:A,tumblr:E,siteUrl:t})))):null};function y(e){return i.createElement(f,e,i.createElement(r,e))}},8453:function(e,t,n){n.d(t,{RP:function(){return o},xA:function(){return l}});var a=n(6540);const i=a.createContext({});function o(e){const t=a.useContext(i);return a.useMemo(()=>"function"==typeof e?e(t):{...t,...e},[t,e])}const r={};function l({components:e,children:t,disableParentContext:n}){let l;return l=n?"function"==typeof e?e({}):e||r:o(e),a.createElement(i.Provider,{value:l},t)}}}]);
2//# sourceMappingURL=component---src-templates-post-js-content-file-path-content-posts-git-multiple-emails-index-md-492934257ab3eca222c5.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.