{"action":"created","comment":{"url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/comments/60755610","id":60755610,"diff_hunk":"@@ -1,95 +1,93 @@\n-git-checkout\n-============\n-\n-* Switch branches or restore working tree files\n-\n-Let's create OS X version after all. This time we'll use `git-checkout`\n-with `-b` switch, which creates new branch if it doesn't exist already\n-and switches into it\n-\n-\tgit checkout -b my_apple_app\n-\n-with knowledge from last part we can check if it worked\n-\n-\t$ git branch\n-\t  master\n-\t* my_apple_app\n-\n-Now we \"implement\" OS X version and commit it\n-\n-\t$ mkdir MyAppleApp\n-\t$ echo \"OS X implementation\" > MyAppleApp/osx.txt\n-\t$ git add MyAppleApp\n-\t$ git commit -m \"OS X version\"\n-\n-But this version will require more work, so we switch back to master\n-to do something else\n-\n-    $ git checkout master\n-    $ git branch\n-\t* master\n-\t  my_apple_app\n-\n-Notice that `MyAppleApp` folder is not in the working tree any longer\n-(because it was committed into another branch):\n-\n-\t$ ls -l .\n-\ttotal 4\n-\tdrwxr-xr-x 2 paladin paladin 60 Mar 20 14:58 MyConsoleApp\n-\tdrwxr-xr-x 2 paladin paladin 80 Mar 20 14:58 MyWindowsApp\n-\t-rw-r--r-- 1 paladin paladin 17 Mar 20 14:55 README.md\n-\n-> If you have local uncommitted changes in file(s) that are different between\n-> the current branch and the target branch, `git-checkout` will refuse to switch\n-> branches. You can either commit them or stash them (more on this later)\n-\n-Now it's time to take a look at second usage for `git-checkout`. Restoring\n-files in working tree. Let's see how `MyConsoleApp/console.txt` looks\n-\n-\t$ cat MyConsoleApp/console.txt \n-\tAdded during git workshop\n-\n-Do some modifications to the file and check the repository status\n-\n-\t$ git status\n-\tOn branch master\n-\tChanges not staged for commit:\n-\t  (use \"git add <file>...\" to update what will be committed)\n-\t  (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\n-\t\tmodified:   MyConsoleApp/console.txt\n-\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\n-Now let's throw away those changes because we don't need them.\n-\n-    $ git checkout MyConsoleApp/console.txt\n-\t$ git status\n-\tOn branch master\n-\tnothing to commit, working directory clean\n-\n-> Important to notice here is that there is no warning before overwriting the changes.\n-> And in general there is no way to get them back after doing checkout. So be careful.\n-\n-You can do similar thing for deleted files\n-\n-\t$ rm MyConsoleApp/console.txt\n-\t$ git status\n-\tOn branch master\n-\tChanges not staged for commit:\n-\t  (use \"git add/rm <file>...\" to update what will be committed)\n-\t  (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\n-\t\tdeleted:    MyConsoleApp/console.txt\n-\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\t$ git checkout MyConsoleApp/console.txt\n-\t$ git status\n-\tOn branch master\n-\tnothing to commit, working directory clean\n-\n-More informations\n------------------\n-\n-I recommend checking [git-checkout documentation](https://git-scm.com/docs/git-checkout) for more details,\n-you can try to merge when there is a conflict, checkout exact commit (which detaches a HEAD) and more.\n+git-checkout\r\n+============\r\n+\r\n+* Switch branches or restore working tree files\r\n+\r\n+Let's create OS X version after all. This time we'll use `git-checkout`\r\n+with `-b` switch, which creates new branch if it doesn't exist already\r\n+and checkout the new branch\r\n+\tgit checkout -b my_apple_app\r","path":"07-Checkout/readme.md","position":104,"original_position":104,"commit_id":"4731e4e529ccc2bfb3d211740c4604ac1744326b","original_commit_id":"4731e4e529ccc2bfb3d211740c4604ac1744326b","user":{"login":"graywolf","id":790463,"avatar_url":"https://avatars.githubusercontent.com/u/790463?v=3","gravatar_id":"","url":"https://api.github.com/users/graywolf","html_url":"https://github.com/graywolf","followers_url":"https://api.github.com/users/graywolf/followers","following_url":"https://api.github.com/users/graywolf/following{/other_user}","gists_url":"https://api.github.com/users/graywolf/gists{/gist_id}","starred_url":"https://api.github.com/users/graywolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graywolf/subscriptions","organizations_url":"https://api.github.com/users/graywolf/orgs","repos_url":"https://api.github.com/users/graywolf/repos","events_url":"https://api.github.com/users/graywolf/events{/privacy}","received_events_url":"https://api.github.com/users/graywolf/received_events","type":"User","site_admin":false},"body":"Here you need to add blank line between lines 8 & 9 in order to make `git checkout -b my_apple_app` a code block","created_at":"2016-04-22T15:17:52Z","updated_at":"2016-04-22T15:17:52Z","html_url":"https://github.com/DevTrainings/GitTraining/pull/28#discussion_r60755610","pull_request_url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/comments/60755610"},"html":{"href":"https://github.com/DevTrainings/GitTraining/pull/28#discussion_r60755610"},"pull_request":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28","id":67522424,"html_url":"https://github.com/DevTrainings/GitTraining/pull/28","diff_url":"https://github.com/DevTrainings/GitTraining/pull/28.diff","patch_url":"https://github.com/DevTrainings/GitTraining/pull/28.patch","issue_url":"https://api.github.com/repos/DevTrainings/GitTraining/issues/28","number":28,"state":"open","locked":false,"title":"Spelling and grammar changes.  Some minor edits","user":{"login":"KyleFord76063","id":18615875,"avatar_url":"https://avatars.githubusercontent.com/u/18615875?v=3","gravatar_id":"","url":"https://api.github.com/users/KyleFord76063","html_url":"https://github.com/KyleFord76063","followers_url":"https://api.github.com/users/KyleFord76063/followers","following_url":"https://api.github.com/users/KyleFord76063/following{/other_user}","gists_url":"https://api.github.com/users/KyleFord76063/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleFord76063/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleFord76063/subscriptions","organizations_url":"https://api.github.com/users/KyleFord76063/orgs","repos_url":"https://api.github.com/users/KyleFord76063/repos","events_url":"https://api.github.com/users/KyleFord76063/events{/privacy}","received_events_url":"https://api.github.com/users/KyleFord76063/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-22T14:41:52Z","updated_at":"2016-04-22T15:17:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11042332e435b88014d201994968f4ad1ed542ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28/commits","review_comments_url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28/comments","review_comment_url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DevTrainings/GitTraining/issues/28/comments","statuses_url":"https://api.github.com/repos/DevTrainings/GitTraining/statuses/4731e4e529ccc2bfb3d211740c4604ac1744326b","head":{"label":"KyleFord76063:master","ref":"master","sha":"4731e4e529ccc2bfb3d211740c4604ac1744326b","user":{"login":"KyleFord76063","id":18615875,"avatar_url":"https://avatars.githubusercontent.com/u/18615875?v=3","gravatar_id":"","url":"https://api.github.com/users/KyleFord76063","html_url":"https://github.com/KyleFord76063","followers_url":"https://api.github.com/users/KyleFord76063/followers","following_url":"https://api.github.com/users/KyleFord76063/following{/other_user}","gists_url":"https://api.github.com/users/KyleFord76063/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleFord76063/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleFord76063/subscriptions","organizations_url":"https://api.github.com/users/KyleFord76063/orgs","repos_url":"https://api.github.com/users/KyleFord76063/repos","events_url":"https://api.github.com/users/KyleFord76063/events{/privacy}","received_events_url":"https://api.github.com/users/KyleFord76063/received_events","type":"User","site_admin":false},"repo":{"id":56862179,"name":"GitTraining","full_name":"KyleFord76063/GitTraining","owner":{"login":"KyleFord76063","id":18615875,"avatar_url":"https://avatars.githubusercontent.com/u/18615875?v=3","gravatar_id":"","url":"https://api.github.com/users/KyleFord76063","html_url":"https://github.com/KyleFord76063","followers_url":"https://api.github.com/users/KyleFord76063/followers","following_url":"https://api.github.com/users/KyleFord76063/following{/other_user}","gists_url":"https://api.github.com/users/KyleFord76063/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleFord76063/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleFord76063/subscriptions","organizations_url":"https://api.github.com/users/KyleFord76063/orgs","repos_url":"https://api.github.com/users/KyleFord76063/repos","events_url":"https://api.github.com/users/KyleFord76063/events{/privacy}","received_events_url":"https://api.github.com/users/KyleFord76063/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KyleFord76063/GitTraining","description":"","fork":true,"url":"https://api.github.com/repos/KyleFord76063/GitTraining","forks_url":"https://api.github.com/repos/KyleFord76063/GitTraining/forks","keys_url":"https://api.github.com/repos/KyleFord76063/GitTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KyleFord76063/GitTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KyleFord76063/GitTraining/teams","hooks_url":"https://api.github.com/repos/KyleFord76063/GitTraining/hooks","issue_events_url":"https://api.github.com/repos/KyleFord76063/GitTraining/issues/events{/number}","events_url":"https://api.github.com/repos/KyleFord76063/GitTraining/events","assignees_url":"https://api.github.com/repos/KyleFord76063/GitTraining/assignees{/user}","branches_url":"https://api.github.com/repos/KyleFord76063/GitTraining/branches{/branch}","tags_url":"https://api.github.com/repos/KyleFord76063/GitTraining/tags","blobs_url":"https://api.github.com/repos/KyleFord76063/GitTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KyleFord76063/GitTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KyleFord76063/GitTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/KyleFord76063/GitTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KyleFord76063/GitTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/KyleFord76063/GitTraining/languages","stargazers_url":"https://api.github.com/repos/KyleFord76063/GitTraining/stargazers","contributors_url":"https://api.github.com/repos/KyleFord76063/GitTraining/contributors","subscribers_url":"https://api.github.com/repos/KyleFord76063/GitTraining/subscribers","subscription_url":"https://api.github.com/repos/KyleFord76063/GitTraining/subscription","commits_url":"https://api.github.com/repos/KyleFord76063/GitTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/KyleFord76063/GitTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/KyleFord76063/GitTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/KyleFord76063/GitTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/KyleFord76063/GitTraining/contents/{+path}","compare_url":"https://api.github.com/repos/KyleFord76063/GitTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KyleFord76063/GitTraining/merges","archive_url":"https://api.github.com/repos/KyleFord76063/GitTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KyleFord76063/GitTraining/downloads","issues_url":"https://api.github.com/repos/KyleFord76063/GitTraining/issues{/number}","pulls_url":"https://api.github.com/repos/KyleFord76063/GitTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/KyleFord76063/GitTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/KyleFord76063/GitTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KyleFord76063/GitTraining/labels{/name}","releases_url":"https://api.github.com/repos/KyleFord76063/GitTraining/releases{/id}","deployments_url":"https://api.github.com/repos/KyleFord76063/GitTraining/deployments","created_at":"2016-04-22T14:39:55Z","updated_at":"2016-04-08T12:29:53Z","pushed_at":"2016-04-22T14:41:00Z","git_url":"git://github.com/KyleFord76063/GitTraining.git","ssh_url":"git@github.com:KyleFord76063/GitTraining.git","clone_url":"https://github.com/KyleFord76063/GitTraining.git","svn_url":"https://github.com/KyleFord76063/GitTraining","homepage":null,"size":94,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DevTrainings:master","ref":"master","sha":"16fa6d535f0859fb07343c44961c517572e94368","user":{"login":"DevTrainings","id":18348085,"avatar_url":"https://avatars.githubusercontent.com/u/18348085?v=3","gravatar_id":"","url":"https://api.github.com/users/DevTrainings","html_url":"https://github.com/DevTrainings","followers_url":"https://api.github.com/users/DevTrainings/followers","following_url":"https://api.github.com/users/DevTrainings/following{/other_user}","gists_url":"https://api.github.com/users/DevTrainings/gists{/gist_id}","starred_url":"https://api.github.com/users/DevTrainings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevTrainings/subscriptions","organizations_url":"https://api.github.com/users/DevTrainings/orgs","repos_url":"https://api.github.com/users/DevTrainings/repos","events_url":"https://api.github.com/users/DevTrainings/events{/privacy}","received_events_url":"https://api.github.com/users/DevTrainings/received_events","type":"Organization","site_admin":false},"repo":{"id":54104538,"name":"GitTraining","full_name":"DevTrainings/GitTraining","owner":{"login":"DevTrainings","id":18348085,"avatar_url":"https://avatars.githubusercontent.com/u/18348085?v=3","gravatar_id":"","url":"https://api.github.com/users/DevTrainings","html_url":"https://github.com/DevTrainings","followers_url":"https://api.github.com/users/DevTrainings/followers","following_url":"https://api.github.com/users/DevTrainings/following{/other_user}","gists_url":"https://api.github.com/users/DevTrainings/gists{/gist_id}","starred_url":"https://api.github.com/users/DevTrainings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevTrainings/subscriptions","organizations_url":"https://api.github.com/users/DevTrainings/orgs","repos_url":"https://api.github.com/users/DevTrainings/repos","events_url":"https://api.github.com/users/DevTrainings/events{/privacy}","received_events_url":"https://api.github.com/users/DevTrainings/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DevTrainings/GitTraining","description":"","fork":false,"url":"https://api.github.com/repos/DevTrainings/GitTraining","forks_url":"https://api.github.com/repos/DevTrainings/GitTraining/forks","keys_url":"https://api.github.com/repos/DevTrainings/GitTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DevTrainings/GitTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DevTrainings/GitTraining/teams","hooks_url":"https://api.github.com/repos/DevTrainings/GitTraining/hooks","issue_events_url":"https://api.github.com/repos/DevTrainings/GitTraining/issues/events{/number}","events_url":"https://api.github.com/repos/DevTrainings/GitTraining/events","assignees_url":"https://api.github.com/repos/DevTrainings/GitTraining/assignees{/user}","branches_url":"https://api.github.com/repos/DevTrainings/GitTraining/branches{/branch}","tags_url":"https://api.github.com/repos/DevTrainings/GitTraining/tags","blobs_url":"https://api.github.com/repos/DevTrainings/GitTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DevTrainings/GitTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DevTrainings/GitTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/DevTrainings/GitTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DevTrainings/GitTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/DevTrainings/GitTraining/languages","stargazers_url":"https://api.github.com/repos/DevTrainings/GitTraining/stargazers","contributors_url":"https://api.github.com/repos/DevTrainings/GitTraining/contributors","subscribers_url":"https://api.github.com/repos/DevTrainings/GitTraining/subscribers","subscription_url":"https://api.github.com/repos/DevTrainings/GitTraining/subscription","commits_url":"https://api.github.com/repos/DevTrainings/GitTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/DevTrainings/GitTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/DevTrainings/GitTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/DevTrainings/GitTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/DevTrainings/GitTraining/contents/{+path}","compare_url":"https://api.github.com/repos/DevTrainings/GitTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DevTrainings/GitTraining/merges","archive_url":"https://api.github.com/repos/DevTrainings/GitTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DevTrainings/GitTraining/downloads","issues_url":"https://api.github.com/repos/DevTrainings/GitTraining/issues{/number}","pulls_url":"https://api.github.com/repos/DevTrainings/GitTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/DevTrainings/GitTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/DevTrainings/GitTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DevTrainings/GitTraining/labels{/name}","releases_url":"https://api.github.com/repos/DevTrainings/GitTraining/releases{/id}","deployments_url":"https://api.github.com/repos/DevTrainings/GitTraining/deployments","created_at":"2016-03-17T09:16:49Z","updated_at":"2016-04-08T12:29:53Z","pushed_at":"2016-04-22T14:57:40Z","git_url":"git://github.com/DevTrainings/GitTraining.git","ssh_url":"git@github.com:DevTrainings/GitTraining.git","clone_url":"https://github.com/DevTrainings/GitTraining.git","svn_url":"https://github.com/DevTrainings/GitTraining","homepage":null,"size":96,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28"},"html":{"href":"https://github.com/DevTrainings/GitTraining/pull/28"},"issue":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/issues/28"},"comments":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/DevTrainings/GitTraining/statuses/4731e4e529ccc2bfb3d211740c4604ac1744326b"}}}}