{"id":312,"date":"2018-01-18T17:51:37","date_gmt":"2018-01-18T17:51:37","guid":{"rendered":"http:\/\/kevinmichaelcoy.com\/blog\/?p=312"},"modified":"2018-01-18T17:53:33","modified_gmt":"2018-01-18T17:53:33","slug":"setting-default-home-directory-with-git-bash","status":"publish","type":"post","link":"http:\/\/kevinmichaelcoy.com\/blog\/2018\/01\/18\/setting-default-home-directory-with-git-bash\/","title":{"rendered":"Setting Default Home Directory with Git Bash"},"content":{"rendered":"<p>Recently I was getting a new development environment set up and I needed Git Bash. I noticed that Git Bash would start at an <code>l<\/code> drive when I launched it, instead of my user&#8217;s home directory. To change the directory to your user&#8217;s actual home directory, simply execute the following command:<\/p>\n<p>[code language=&#8221;bash&#8221;]<br \/>\necho &quot;cd \/c\/Users\/[username]&quot; &gt;&gt; \/l\/.bashrc<br \/>\n[\/code]<\/p>\n<p>Make sure to replace <code>[username]<\/code> with your actual username or ID. Also, be mindful that you will be appending to this file, if it already exists, or creating the <code>.bashrc<\/code> hidden file automatically with the contents of the <code>echo<\/code>. <\/p>\n<p>Also, if you use shortcuts with <code>alias<\/code>&#8216;es via the <code>.bash_profile<\/code>, you will need to modify or create the <code>.bash_profile<\/code> in the home directory Git Bash launches in (ie, the <code>l<\/code> drive). For example,<\/p>\n<p>[code language=&#8221;bash&#8221;]<br \/>\n$ cat \/l\/.bash_profile<br \/>\nalias mci=&#8217;mvn clean install -DskipTests -U&#8217;<br \/>\n[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was getting a new development environment set up and I needed Git Bash. I noticed that Git Bash would start at an l drive when I launched it, instead of my user&#8217;s home directory. To change the directory to your user&#8217;s actual home directory, simply execute the following&#8230;<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/kevinmichaelcoy.com\/blog\/2018\/01\/18\/setting-default-home-directory-with-git-bash\/\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,3],"tags":[285,286,282,284,283],"_links":{"self":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/312"}],"collection":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":7,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":319,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/312\/revisions\/319"}],"wp:attachment":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}