{"thread":{"id":"6883","subject":"2 things about branches","startedAt":"2007-02-19T18:13:59Z","lastAt":"2007-02-19T18:37:03Z","messageCount":2,"participants":["Raimund Bauer","J. Bruce Fields"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"35015","messageId":"1171908840.10817.21.camel@localhost","threadId":"6883","inReplyTo":null,"subject":"2 things about branches","fromName":"Raimund Bauer","fromEmail":"ray007@gmx.net","sentAt":"2007-02-19T18:13:59Z","receivedAt":"2007-02-19T18:13:59Z","isPatch":false,"sender":{"key":"ray007@gmx.net","avatar":null},"body":"I think it's a good idea to not list remote branches in 'git branch'\noutput per default, but imho we should make an exception for the branch\nthe user is currently on.\nCurrently when I do 'git checkout origin/next' the checkout works fine\nand I get the warning about the remote branch, but an informational\nquery 'git branch' right after that says\n\n* (no branch)\n  master\n\n'git branch -r' also doesn't mark me as being on origin/next.\nMaybe we could query the remote-branches for a matching ref this case?\n\nAnd another wish about branches:\nAfter a fresh clone of git, my .git/config contains a section\n\n[branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n\nso it's easy to keep the branch updated by just saying 'git pull' when\non branch master.\n\nDoing 'git checkout -b next origin/next' gives me my own next-branch,\nbut short of editing .git/config there seems to be no way to get a\nsimilar section [branch \"next\"] ... so I can follow next as easy as\nmaster.\nI'm not sure if there exists a sane default we could use automatically,\nbut maybe a switch to git-checkout to write a config entry would be\npossible?\n\nThanks for listening to my rambling\n\n-- \nbest regards\n\n  Ray\n"},{"id":"35016","messageId":"20070219183703.GB29930@fieldses.org","threadId":"6883","inReplyTo":"1171908840.10817.21.camel@localhost","subject":"Re: 2 things about branches","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-02-19T18:37:03Z","receivedAt":"2007-02-19T18:37:03Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Mon, Feb 19, 2007 at 07:13:59PM +0100, Raimund Bauer wrote:\n> I think it's a good idea to not list remote branches in 'git branch'\n> output per default, but imho we should make an exception for the branch\n> the user is currently on.\n> Currently when I do 'git checkout origin/next' the checkout works fine\n> and I get the warning about the remote branch, but an informational\n> query 'git branch' right after that says\n> \n> * (no branch)\n>   master\n> \n> 'git branch -r' also doesn't mark me as being on origin/next.\n\nThat's because you're not really \"on\" origin/next.  Your currently\nchecked-out state happens to be the same as the state that origin/next\npoints at, but that's not quite the same thing.  The main difference\nbeing that if you commit something, origin/next won't be moved forward\nto point at the new commit.\n\n> Maybe we could query the remote-branches for a matching ref this case?\n\nIf that's what you want you could use e.g.\n\n\tgit describe --all\n\n--b.\n"}]}