{"id":1785,"date":"2021-12-08T20:33:37","date_gmt":"2021-12-09T01:33:37","guid":{"rendered":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/?p=1785"},"modified":"2021-12-08T20:41:02","modified_gmt":"2021-12-09T01:41:02","slug":"git-credentials","status":"publish","type":"post","link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/topics\/dev-environment\/git-credentials\/","title":{"rendered":"Git Credentials"},"content":{"rendered":"\n<p>When you&#8217;re working with Git and doing things like making commits, Git tracks who it is that made the commit. In order to do that Git needs to know your username and email.<\/p>\n\n\n\n<p>If you haven&#8217;t set that up you will see an error when you try to make a commit. Something like this in VS Code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-content\/uploads\/sites\/1879\/2021\/09\/Screen-Shot-2021-09-28-at-6.16.37-PM.png\" alt=\"\" class=\"wp-image-1786\" width=\"149\" height=\"164\" srcset=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-content\/uploads\/sites\/1879\/2021\/09\/Screen-Shot-2021-09-28-at-6.16.37-PM.png 594w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-content\/uploads\/sites\/1879\/2021\/09\/Screen-Shot-2021-09-28-at-6.16.37-PM-272x300.png 272w\" sizes=\"auto, (max-width: 149px) 100vw, 149px\" \/><\/figure>\n\n\n\n<p>The fix is not hard, but not easy to understand from the message you see. If you open Git Log you will see something like this:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>To fix it you will need to copy and paste each line, one at a time, paste it into the Terminal and replace the username and email with your username and email. Use the ones you did for GitHub to help keep that the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Video Example<\/h2>\n\n\n\n<p>Here is a video of Angelica and I going over that. Along the way we also update Oh My Zsh (a terminal skin you can get) and show making a new branch.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/www.dropbox.com\/s\/jgy6jq8y4woz4eb\/git-credentials-zsh-branching.mp4?raw=1\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When you&#8217;re working with Git and doing things like making commits, Git tracks who it is that made the commit. In order to do that Git needs to know your username and email. If you haven&#8217;t set that up you will see an error when you try to make a commit. Something like this in&hellip; <a class=\"more-link\" href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/topics\/dev-environment\/git-credentials\/\">Continue reading <span class=\"screen-reader-text\">Git Credentials<\/span><\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","portfolio_post_id":0,"portfolio_citation":"","portfolio_annotation":"","openlab_post_visibility":"","footnotes":""},"categories":[21,136],"tags":[182,12,143],"coauthors":[87],"class_list":["post-1785","post","type-post","status-publish","format-standard","hentry","category-dev-environment","category-tools","tag-credentials","tag-git","tag-github","entry"],"featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":"","post-thumbnail":"","gform-image-choice-sm":"","gform-image-choice-md":"","gform-image-choice-lg":""},"post_excerpt_stackable_v2":"<p>When you&#8217;re working with Git and doing things like making commits, Git tracks who it is that made the commit. In order to do that Git needs to know your username and email. If you haven&#8217;t set that up you will see an error when you try to make a commit. Something like this in VS Code: The fix is not hard, but not easy to understand from the message you see. If you open Git Log you will see something like this: To fix it you will need to copy and paste each line, one at a time, paste&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/category\/topics\/dev-environment\/\" rel=\"category tag\">Dev Environment<\/a>, <a href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/category\/tools\/\" rel=\"category tag\">Tools<\/a>","author_info_v2":{"name":"Christopher Stein","url":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/author\/cstein\/"},"comments_num_v2":"0 comments","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false,"gform-image-choice-sm":false,"gform-image-choice-md":false,"gform-image-choice-lg":false},"uagb_author_info":{"display_name":"Christopher Stein","author_link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/author\/cstein\/"},"uagb_comment_info":0,"uagb_excerpt":"When you&#8217;re working with Git and doing things like making commits, Git tracks who it is that made the commit. In order to do that Git needs to know your username and email. If you haven&#8217;t set that up you will see an error when you try to make a commit. Something like this in&hellip;&hellip;","_links":{"self":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/posts\/1785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/comments?post=1785"}],"version-history":[{"count":1,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/posts\/1785\/revisions"}],"predecessor-version":[{"id":2267,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/posts\/1785\/revisions\/2267"}],"wp:attachment":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/media?parent=1785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/categories?post=1785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/tags?post=1785"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-fall-21\/wp-json\/wp\/v2\/coauthors?post=1785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}