{"thread":{"id":"23213","subject":"updating github.com forks, developing in remote branches and svn:eol-style equiv?","startedAt":"2010-03-28T06:32:51Z","lastAt":"2010-03-28T17:42:45Z","messageCount":4,"participants":["Thomas Anderson","Alexander Iljin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137995","messageId":"15b345f1003272332u2f4d38ear5c8aeef9b35f5037@mail.gmail.com","threadId":"23213","inReplyTo":null,"subject":"updating github.com forks, developing in remote branches and svn:eol-style equiv?","fromName":"Thomas Anderson","fromEmail":"zelnaga@gmail.com","sentAt":"2010-03-28T06:32:51Z","receivedAt":"2010-03-28T06:32:51Z","isPatch":false,"sender":{"key":"zelnaga@gmail.com","avatar":null},"body":"Say on github.com I fork a repository.  Two weeks later, updates have\nbeen made to the original repository and now I want to update my fork.\n How do I do this?\n\nOne possibility that occurs to me: I can create a new remote\nrepository - let's say \"upstream\" - with the URL of the original\nrepository and I can pull from that instead of the forked \"origin\"\nrepository.  I can then push the updates to the forked repository.\n\nIs that the best way to do it, though?  It seems to me that I ought to\nbe able to have my github.com fork pull updates itself without my\nhaving to pull and push with my own local repo.\n\nAlso, I'm unclear how to develop in remote branches.  If I go to the\n\"Switch/Checkout...\" dialog I can switch to, say,\n\"remotes/origin/random-branch\".  I do that, make some changes to one\nof the new files and I then try to push those changes back.  In the\nlocal drop down menu I only see two local branches, however - \"(no\nbranch)\" and the default branch.  Why is that?  If I just switched the\nbranch to, say, \"remotes/origin/random-branch\", shouldn't I now be\nseeing that branch locally?\n\nFinally, is there any Git equivalent to SVN's svn:eol-style and if so\nhow do I take advantage of it?\n"},{"id":"137997","messageId":"158811269761123@webmail102.yandex.ru","threadId":"23213","inReplyTo":"15b345f1003272332u2f4d38ear5c8aeef9b35f5037@mail.gmail.com","subject":"Re: updating github.com forks, developing in remote branches and svn:eol-style equiv?","fromName":"Alexander Iljin","fromEmail":"ajsoft@yandex.ru","sentAt":"2010-03-28T07:25:23Z","receivedAt":"2010-03-28T07:25:23Z","isPatch":false,"sender":{"key":"ajsoft@yandex.ru","avatar":"https://gravatar.com/avatar/5d53b714db7aaf3add180e650b6cbcfc17cd4ca0f29981ad97222e969a24bebb?d=mp&s=160"},"body":"Hello!\n\n> Say on github.com I fork a repository.  Two weeks later, updates have\n>  been made to the original repository and now I want to update my fork.\n>   How do I do this?\n>  \n>  One possibility that occurs to me: I can create a new remote\n>  repository - let's say \"upstream\" - with the URL of the original\n>  repository and I can pull from that instead of the forked \"origin\"\n>  repository.  I can then push the updates to the forked repository.\n>  \n>  Is that the best way to do it, though?  It seems to me that I ought to\n>  be able to have my github.com fork pull updates itself without my\n>  having to pull and push with my own local repo.\n\n  You should do it the way you described - via local repository, because you\n  might need to resolve conflicts along the way.\n  There is the \"Fork Queue\" feature on GitHub, you may give it a try.\n\n>  Also, I'm unclear how to develop in remote branches.  If I go to the\n>  \"Switch/Checkout...\" dialog I can switch to, say,\n>  \"remotes/origin/random-branch\".  I do that, make some changes to one\n>  of the new files and I then try to push those changes back.  In the\n>  local drop down menu I only see two local branches, however - \"(no\n>  branch)\" and the default branch.  Why is that?  If I just switched the\n>  branch to, say, \"remotes/origin/random-branch\", shouldn't I now be\n>  seeing that branch locally?\n\n  To have a local branch you should create it:\n  git checkout -b branchName remotes/origin/branchName\n  Remote branches are there only to track the state of the remote repo,\n  you should only commit to local branches and then push your work to\n  remotes.\n\n>  Finally, is there any Git equivalent to SVN's svn:eol-style and if so\n>  how do I take advantage of it?\n\n  git help config\n  Look for \"autocrlf\", \"safecrlf\", etc.\n  You can set these options globally or per repository.\n\n---=====---\n Alexander\n"},{"id":"138018","messageId":"15b345f1003281007r3e8b3e86p787f9ef554054adf@mail.gmail.com","threadId":"23213","inReplyTo":"158811269761123@webmail102.yandex.ru","subject":"Re: updating github.com forks, developing in remote branches and svn:eol-style equiv?","fromName":"Thomas Anderson","fromEmail":"zelnaga@gmail.com","sentAt":"2010-03-28T17:07:14Z","receivedAt":"2010-03-28T17:07:14Z","isPatch":false,"sender":{"key":"zelnaga@gmail.com","avatar":null},"body":"On Sun, Mar 28, 2010 at 2:25 AM, Alexander Iljin <ajsoft@yandex.ru> wrote:\n\n>  You should do it the way you described - via local repository, because you\n>  might need to resolve conflicts along the way.\n>  There is the \"Fork Queue\" feature on GitHub, you may give it a try.\n\nIn playing around with their Fork Queue feature...  I have a week old\nfork to which I've made no changes.  I do \"Select All\" for al the\nchanges in teh original fork and then select \"Apply\" in the drop down\n\"Actions\" menu.  It then just sits there doing nothing.  It says\n\"Status: Processing 1 of 8 Commits\" and that's it.  Shouldn't it\nactually be doing something?\n\n>  To have a local branch you should create it:\n>  git checkout -b branchName remotes/origin/branchName\n>  Remote branches are there only to track the state of the remote repo,\n>  you should only commit to local branches and then push your work to\n>  remotes.\n\nI think I figured out some of my confusion - there's a \"Create New\nBranch\" checkbox in the \"Checkout\\Switch\" dialog that needs to be\nchecked that isn't by default.  I guess the idea is that, by default,\nTortoiseGit assumes you want to make the branch you checkout the\ndefault branch?\n"},{"id":"138026","messageId":"159821389.20100329004245@yandex.ru","threadId":"23213","inReplyTo":"15b345f1003281007r3e8b3e86p787f9ef554054adf@mail.gmail.com","subject":"Re: updating github.com forks, developing in remote branches and svn:eol-style equiv?","fromName":"Alexander Iljin","fromEmail":"ajsoft@yandex.ru","sentAt":"2010-03-28T17:42:45Z","receivedAt":"2010-03-28T17:42:45Z","isPatch":false,"sender":{"key":"ajsoft@yandex.ru","avatar":"https://gravatar.com/avatar/5d53b714db7aaf3add180e650b6cbcfc17cd4ca0f29981ad97222e969a24bebb?d=mp&s=160"},"body":"Hello!\n\nTA> In playing around with their Fork Queue feature...  I have a week old\nTA> fork to which I've made no changes.  I do \"Select All\" for al the\nTA> changes in teh original fork and then select \"Apply\" in the drop down\nTA> \"Actions\" menu.  It then just sits there doing nothing.  It says\nTA> \"Status: Processing 1 of 8 Commits\" and that's it.  Shouldn't it\nTA> actually be doing something?\n\n  Last time I tried it, it said that I'll have conflicts, even though\n  it was clearly a fast-forward situation. I think that either the\n  feature is not production-ready, or I am severely missing something.\n  I don't know the current situation, that's why I suggested you give\n  it a try.\n\nTA> I think I figured out some of my confusion - there's a \"Create New\nTA> Branch\" checkbox in the \"Checkout\\Switch\" dialog that needs to be\nTA> checked that isn't by default.  I guess the idea is that, by default,\nTA> TortoiseGit assumes you want to make the branch you checkout the\nTA> default branch?\n\n  I don't use TGit. Previous version used to hang its cache process,\n  consuming 100% CPU. After once restarting it 3 times in 10 minutes I\n  got rid of it. Didn't have time to give the latest version a try.\n  I like the idea, and the GUI looks very usable, but I guess the\n  implementation is pretty sloppy. Unlike TSvn, which is great.\n\n  I'm using msysgit with gitk and git gui (in previous version\n  git gui didn't show diffs, but the latest works almost fine).\n\n---=====---\n Alexander\n"}]}