{"action":"created","issue":{"url":"https://api.github.com/repos/qw3rtman/gg/issues/50","labels_url":"https://api.github.com/repos/qw3rtman/gg/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/qw3rtman/gg/issues/50/comments","events_url":"https://api.github.com/repos/qw3rtman/gg/issues/50/events","html_url":"https://github.com/qw3rtman/gg/issues/50","id":101850017,"number":50,"title":"`gg cl` to move inside cloned directory","user":{"login":"mkody","id":843787,"avatar_url":"https://avatars.githubusercontent.com/u/843787?v=3","gravatar_id":"","url":"https://api.github.com/users/mkody","html_url":"https://github.com/mkody","followers_url":"https://api.github.com/users/mkody/followers","following_url":"https://api.github.com/users/mkody/following{/other_user}","gists_url":"https://api.github.com/users/mkody/gists{/gist_id}","starred_url":"https://api.github.com/users/mkody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkody/subscriptions","organizations_url":"https://api.github.com/users/mkody/orgs","repos_url":"https://api.github.com/users/mkody/repos","events_url":"https://api.github.com/users/mkody/events{/privacy}","received_events_url":"https://api.github.com/users/mkody/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/qw3rtman/gg/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-19T09:44:25Z","updated_at":"2015-10-13T03:53:43Z","closed_at":null,"body":"When *most people* use the `git clone` command, they just directly move inside the directory with `cd`.\r\n\r\nI'm suggesting to make `gg cl` automatically change the current directory to the cloned repo... or maybe add a new command?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/qw3rtman/gg/issues/comments/147589744","html_url":"https://github.com/qw3rtman/gg/issues/50#issuecomment-147589744","issue_url":"https://api.github.com/repos/qw3rtman/gg/issues/50","id":147589744,"user":{"login":"qw3rtman","id":1139621,"avatar_url":"https://avatars.githubusercontent.com/u/1139621?v=3","gravatar_id":"","url":"https://api.github.com/users/qw3rtman","html_url":"https://github.com/qw3rtman","followers_url":"https://api.github.com/users/qw3rtman/followers","following_url":"https://api.github.com/users/qw3rtman/following{/other_user}","gists_url":"https://api.github.com/users/qw3rtman/gists{/gist_id}","starred_url":"https://api.github.com/users/qw3rtman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qw3rtman/subscriptions","organizations_url":"https://api.github.com/users/qw3rtman/orgs","repos_url":"https://api.github.com/users/qw3rtman/repos","events_url":"https://api.github.com/users/qw3rtman/events{/privacy}","received_events_url":"https://api.github.com/users/qw3rtman/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T03:53:43Z","updated_at":"2015-10-13T03:53:43Z","body":"This is essentially creating the directory beforehand and them cloning into that directory, which is a valid solution except the issue we are running into is related to how Shell scripts execute commands.\r\n\r\nIn a Shell script, a [subshell](http://www.tldp.org/LDP/abs/html/subshells.html) is created. `cd` will change the directory of the subshell, which is different from the shell that is executing the script (i.e. the user's terminal).\r\n\r\n[Here's a better explanation.](http://stackoverflow.com/questions/255414/why-doesnt-cd-work-in-a-bash-shell-script)"}}