{"id":1304,"date":"2022-10-14T18:18:16","date_gmt":"2022-10-14T18:18:16","guid":{"rendered":"https:\/\/www.lib.uiowa.edu\/data\/?page_id=1304"},"modified":"2026-02-18T23:05:15","modified_gmt":"2026-02-18T23:05:15","slug":"share-and-preserve-your-code","status":"publish","type":"page","link":"http:\/\/www.lib.uiowa.edu\/data\/share-and-preserve-your-code\/","title":{"rendered":"Share &amp; Preserve Code"},"content":{"rendered":"<p><a href=\"#repository\">Set Up a Repository<\/a> | <a href=\"#archive\">Archive Your Repository<\/a> | <a href=\"#community\">Add Your Repo to the UIowa Community<\/a><\/p>\n<p>Publishing your code offers many benefits. In addition to <strong>preserving<\/strong> your code and making it <strong>accessible<\/strong> to others, publishing also ensures others can <strong>cite<\/strong> it, <strong>reproduce<\/strong> it, and helps you contribute to the <strong>open science<\/strong> movement.<\/p>\n<p>By connecting <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener\">Github <i class=\"fas fa-external-link-alt\"> <\/i><\/a> for code development, with <a href=\"https:\/\/zenodo.org\/\" target=\"_blank\" rel=\"noopener\">Zenodo <i class=\"fas fa-external-link-alt\"> <\/i><\/a> for preserving and sharing code, you can take advantage of both systems:<\/p>\n<ul>\n<li>Zenodo preserves snapshots of the code and creates a citable DOI for your software, and<\/li>\n<li>when you create new versions in GitHub, you can quickly publish them in Zenodo.<\/li>\n<\/ul>\n<p>If you&#8217;d like a printable PDF of the information below, <a href=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Share_and_Preserve_Your_Code_20220728.pdf\" target=\"_blank\" rel=\"noopener\">click here<\/a>.<\/p>\n<h2 id=\"repository\">First: Set Up a GitHub Repository<\/h2>\n<p><em>A GitHub repository can house anything relevant to your project (including code, API documentation, data sets, spreadsheets, etc.) It will have a unique URL you can share with others.<\/em><\/p>\n<p style=\"padding-left: 40px\">1. Log in to <a href=\"https:\/\/github.com\/login\" target=\"_blank\" rel=\"noopener\">GitHub\u00a0<\/a><\/p>\n<p style=\"padding-left: 40px\">2. Click the green \u201cCreate Repository\u201d button<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1305 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-300x149.png\" alt=\"A screenshot showing step 2 in the directions above.\" width=\"471\" height=\"234\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-300x149.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-1024x509.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-768x382.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-1536x764.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep2-2048x1019.png 2048w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 40px\">3. Choose a descriptive name and write a brief description for your repository.<\/p>\n<p style=\"padding-left: 40px\">4. Make the repository public (this allows you to archive it).<\/p>\n<p style=\"padding-left: 40px\">5. Add a README file now or add it later (just make sure you include one!)<\/p>\n<p style=\"padding-left: 40px\">6. Choose which files not to track (if applicable).<\/p>\n<p style=\"padding-left: 40px\">7. <a href=\"https:\/\/www.lib.uiowa.edu\/data\/share\/licenses\/\" target=\"_blank\" rel=\"noopener\">Choose a license<\/a> for your repository.<\/p>\n<p style=\"padding-left: 40px\">8. Create your repository.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1312 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep3-279x300.png\" alt=\"A screenshot of steps 3-8 above. \" width=\"494\" height=\"532\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep3-279x300.png 279w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep3-951x1024.png 951w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep3-768x827.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/GitHubStep3.png 1282w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"archive\">Next: Archive Your Repository in Zenodo<\/h2>\n<p><em>Zenodo is an open repository that preserves your code and will archive your GitHub repository each time you create a new release. Each submission in Zenodo will be assigned a DOI (digital object identifier), meaning your code can be cited by others.<\/em><\/p>\n<p><em>Archiving in Zenodo requires two steps: linking your GitHub repository with Zenodo and then creating and publishing a release of your repository.<\/em><\/p>\n<h3>Link GitHub with Zenodo:<\/h3>\n<p style=\"padding-left: 40px\">1. Log in to Zenodo with your GitHub account. (Zenodo may prompt you to authorize GitHub).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1314 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-267x300.png\" alt=\"A screenshot showing step 1 above. \" width=\"341\" height=\"383\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-267x300.png 267w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-911x1024.png 911w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-768x863.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-1367x1536.png 1367w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep1-1822x2048.png 1822w\" sizes=\"auto, (max-width: 341px) 100vw, 341px\" \/><\/p>\n<p style=\"padding-left: 40px\">2. From the drop-down menu next to your email address, select GitHub.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1315 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-300x154.png\" alt=\"Screenshot showing step 2 above. \" width=\"548\" height=\"281\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-300x154.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-1024x526.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-768x394.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-1536x788.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ZenodoStep2-2048x1051.png 2048w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 40px\">3. You will see your GitHub repositories. If needed, choose \u201cSync Now\u201d to update.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1324 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-300x183.png\" alt=\"A screenshot of step 3 above. \" width=\"434\" height=\"265\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-300x183.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-1024x623.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-768x468.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-1536x935.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep3-1-2048x1247.png 2048w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/p>\n<h3>Archive Your Repository<\/h3>\n<p style=\"padding-left: 40px\">1. Toggle the &#8220;on&#8221; button next to the repository you want to archive.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1318 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4-300x172.png\" alt=\"Screenshot of step 1 above.\" width=\"406\" height=\"233\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4-300x172.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4-1024x586.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4-768x439.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4-1536x879.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep4.png 1652w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/p>\n<p style=\"padding-left: 40px\">2. Click on the name of the repository.<\/p>\n<p style=\"padding-left: 40px\">3. Choose the \u201cCreate Release\u201d button. This redirects you back to GitHub\u2019s repository page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1319 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-300x157.png\" alt=\"Screenshot of step 3 above. \" width=\"390\" height=\"204\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-300x157.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-1024x536.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-768x402.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-1536x804.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/ArchiveStep5-2048x1072.png 2048w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/p>\n<p style=\"padding-left: 40px\">4. Complete the fields (title, description, version number.) If this is your first release, use version number v1.0.0.<\/p>\n<p style=\"padding-left: 40px\">5. Click \u201cPublish Release\u201d at the bottom of the page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1321 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-300x247.png\" alt=\"Screenshot of steps 4 and 5 above. \" width=\"418\" height=\"344\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-300x247.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-1024x842.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-768x631.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-1536x1262.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/NameandDescribeandPublishRelease-2048x1683.png 2048w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/p>\n<h3 id=\"community\">Add Your Repository to the University of Iowa Community on Zenodo<\/h3>\n<p><em>Uploading your repository to the UIowa community will allow other UIowa researchers to easily find your code (and for you to find theirs!)<\/em><\/p>\n<p style=\"padding-left: 40px\">1. From your list of Zenodo repositories, click the DOI link for the repo you want to add.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1326 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-300x95.png\" alt=\"A screenshot of step 1 above.\" width=\"501\" height=\"159\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-300x95.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-1024x323.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-768x242.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-1536x484.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity1Annotated-2048x646.png 2048w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/p>\n<p style=\"padding-left: 40px\">2. Choose \u201cedit.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1327 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-300x89.png\" alt=\"A screenshot of step 2 above.\" width=\"485\" height=\"144\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-300x89.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-1024x305.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-768x229.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-1536x458.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity2Annotated-2048x610.png 2048w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/p>\n<p style=\"padding-left: 40px\">3. Search for and choose the University of Iowa community.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1328 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-300x169.png\" alt=\"A screenshot of step 3 above.\" width=\"430\" height=\"242\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-300x169.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-1024x578.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-768x433.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-1536x866.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-2048x1155.png 2048w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity3Annotated-195x110.png 195w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/p>\n<p style=\"padding-left: 40px\">4. Save<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1329 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-300x195.png\" alt=\"A screenshot of step 4 above.\" width=\"420\" height=\"273\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-300x195.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-1024x666.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-768x499.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-1536x999.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/AddingtoCommunity4Annotated-2048x1332.png 2048w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>What Now?<\/h3>\n<p>If you return to Zenodo and access GitHub through Zenodo, you should see your repository listed under \u201cEnabled Repositories\u201d with a blue DOI button next to it. (If it\u2019s not there, choose \u201cSync Now\u201d).<\/p>\n<h4>Now you can:<\/h4>\n<p style=\"padding-left: 40px\">1. Edit the archive and\/or publish a new version.<\/p>\n<p style=\"padding-left: 40px\">2. Add a description of the repository and write the metadata.<\/p>\n<p style=\"padding-left: 40px\">3. Click the blue DOI button to copy the badge in Markdown and add it to your README in GitHub.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1331 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-300x112.png\" alt=\"\" width=\"418\" height=\"156\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-300x112.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-1024x381.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-768x286.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-1536x572.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/Click-DOI-2048x762.png 2048w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1332 aligncenter\" src=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN-300x187.png\" alt=\"\" width=\"406\" height=\"253\" srcset=\"https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN-300x187.png 300w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN-1024x637.png 1024w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN-768x478.png 768w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN-1536x956.png 1536w, https:\/\/www.lib.uiowa.edu\/data\/files\/2022\/10\/README-Add-IN.png 1871w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set Up a Repository | Archive Your Repository | Add Your Repo to the UIowa Community Publishing your code offers many benefits. In addition to preserving your code and making [&hellip;]<\/p>\n","protected":false},"author":163,"featured_media":0,"parent":0,"menu_order":23,"comment_status":"closed","ping_status":"closed","template":"pagetpl-data.php","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[],"tags":[],"class_list":["post-1304","page","type-page","status-publish","hentry","","data","wp-json","wp","v2","pages","1304"],"_links":{"self":[{"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/pages\/1304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/users\/163"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/comments?post=1304"}],"version-history":[{"count":28,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/pages\/1304\/revisions"}],"predecessor-version":[{"id":3191,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/pages\/1304\/revisions\/3191"}],"wp:attachment":[{"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/media?parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/categories?post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lib.uiowa.edu\/data\/wp-json\/wp\/v2\/tags?post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}