{"id":7143,"date":"2017-11-28T08:42:26","date_gmt":"2017-11-28T00:42:26","guid":{"rendered":"http:\/\/rmohan.com\/?p=7143"},"modified":"2017-11-28T08:42:26","modified_gmt":"2017-11-28T00:42:26","slug":"setting-git-on-aws-ec2-instance","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7143","title":{"rendered":"Setting git on aws EC2\u00a0instance"},"content":{"rendered":"<div id=\"page\" class=\"hfeed\">\n<div id=\"main\">\n<div id=\"primary\">\n<div id=\"content\" role=\"main\">\n<article id=\"post-214\" class=\"post-214 post type-post status-publish format-standard hentry category-aws tag-amazon tag-aws tag-checkout tag-code tag-ec2 tag-git tag-source\">\n<div class=\"entry-content\">\n<p>Launch an EC2 instance of type Amazon Linux AMI from your aws console.<\/p>\n<p>SSH into your ec2 instance<br \/>\n<code>ssh -i ec2-user@my_ec2_ip_address<\/code><\/p>\n<p>Update the instance<br \/>\n<code>sudo yum update -y<\/code><\/p>\n<p>install developer tools<br \/>\n<code>sudo yum groupinstall -y \"Development Tools\"<\/code><\/p>\n<p>install git<br \/>\n<code>sudo yum install git<\/code><\/p>\n<p>checkout the source code<code><br \/>\ngit clone <a href=\"https:\/\/my.git.repo.git\/\" rel=\"nofollow\">https:\/\/my.git.repo.git<\/a><br \/>\ncd my_local_git_folder<br \/>\ngit checkout -f branch_to_checkout<\/code><\/p>\n<\/div>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\n<p>Launch an EC2 instance of type Amazon Linux AMI from your aws console.<\/p>\n<p>SSH into your ec2 instance ssh -i ec2-user@my_ec2_ip_address<\/p>\n<p>Update the instance sudo yum update -y<\/p>\n<p>install developer tools sudo yum groupinstall -y &#8220;Development Tools&#8221;<\/p>\n<p>install git sudo yum install git<\/p>\n<p>checkout the source code git clone https:\/\/my.git.repo.git cd my_local_git_folder git checkout [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7143"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7143"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7143\/revisions"}],"predecessor-version":[{"id":7144,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7143\/revisions\/7144"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}