{"action":"created","issue":{"url":"https://api.github.com/repos/opal/opal/issues/752","labels_url":"https://api.github.com/repos/opal/opal/issues/752/labels{/name}","comments_url":"https://api.github.com/repos/opal/opal/issues/752/comments","events_url":"https://api.github.com/repos/opal/opal/issues/752/events","html_url":"https://github.com/opal/opal/pull/752","id":61357457,"number":752,"title":"String bugs cleanup, passing #strip, #rstrip, and #hex.","user":{"login":"vais","id":77592,"avatar_url":"https://avatars.githubusercontent.com/u/77592?v=3","gravatar_id":"","url":"https://api.github.com/users/vais","html_url":"https://github.com/vais","followers_url":"https://api.github.com/users/vais/followers","following_url":"https://api.github.com/users/vais/following{/other_user}","gists_url":"https://api.github.com/users/vais/gists{/gist_id}","starred_url":"https://api.github.com/users/vais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vais/subscriptions","organizations_url":"https://api.github.com/users/vais/orgs","repos_url":"https://api.github.com/users/vais/repos","events_url":"https://api.github.com/users/vais/events{/privacy}","received_events_url":"https://api.github.com/users/vais/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-14T02:14:07Z","updated_at":"2015-03-16T14:26:15Z","closed_at":"2015-03-14T16:46:12Z","pull_request":{"url":"https://api.github.com/repos/opal/opal/pulls/752","html_url":"https://github.com/opal/opal/pull/752","diff_url":"https://github.com/opal/opal/pull/752.diff","patch_url":"https://github.com/opal/opal/pull/752.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/opal/opal/issues/comments/81699429","html_url":"https://github.com/opal/opal/pull/752#issuecomment-81699429","issue_url":"https://api.github.com/repos/opal/opal/issues/752","id":81699429,"user":{"login":"Ajedi32","id":1876931,"avatar_url":"https://avatars.githubusercontent.com/u/1876931?v=3","gravatar_id":"","url":"https://api.github.com/users/Ajedi32","html_url":"https://github.com/Ajedi32","followers_url":"https://api.github.com/users/Ajedi32/followers","following_url":"https://api.github.com/users/Ajedi32/following{/other_user}","gists_url":"https://api.github.com/users/Ajedi32/gists{/gist_id}","starred_url":"https://api.github.com/users/Ajedi32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ajedi32/subscriptions","organizations_url":"https://api.github.com/users/Ajedi32/orgs","repos_url":"https://api.github.com/users/Ajedi32/repos","events_url":"https://api.github.com/users/Ajedi32/events{/privacy}","received_events_url":"https://api.github.com/users/Ajedi32/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T14:26:14Z","updated_at":"2015-03-16T14:26:14Z","body":"@vais I found that git becomes much easier to work with once you realize what the underlying commands are actually doing to the commit graph. Allow me to explain:\r\n\r\n> 1. I created the branch on machine A and pushed it to GitHub\r\n\r\nSo far so good. This just adds some commits to the graph.\r\n\r\n> 2. I fetched the branch from GitHub to machine B\r\n\r\nNo problems there.\r\n\r\n> 3. I rebased against the latest master and fixed conflicts\r\n\r\nOkay, so when you rebase, git isn't actually *changing* any of your commits. Commits in git are immutable. What git is actually doing is building up a new set of commits on the new base, then moving your branch pointer onto that new base. So after this, you will have one set of commits on the remote based off of your old base, and a new set of commits locally which is based off of the new base.\r\n\r\n> 4. I pushed the branch to GitHub, but it was rejected\r\n\r\nWhen you push without `--force` or `-f`, git will refuse to make changes to the remote repository which rewrite history. Because updating the remote branch to your new set of commits will require deleting the commits based off of the old base, git refuses to do it.\r\n\r\n> 5. I pulled the branch from GitHub, resolved conflicts, and made a merge commit\r\n\r\nWhen you pull from GitHub here, you're fetching the old, unrebased commits and merging them into your current branch.\r\n\r\n> 6. I pushed the branch to GitHub and it was accepted, but it looks like this now, every commit is there twice. WTF...\r\n\r\nAnd that explains why there are \"two copies\" of each commit. One of those copies is of the unrebased changes, and one is of the new commits that were created when you rebased.\r\n\r\nFor a better understanding of how git works, I recommend you check out http://think-like-a-git.net/ It does a pretty good job of explaining the proper mental model for thinking about operations in git."}}