4 ms·
The point is that you should have personal and short-lived branches. Lots of them. (Any project already has one local branch per each developer, implicitly - it
by groby_b 14y ago
The point is that you should have personal and short-lived branches. Lots of them. (Any project already has one local branch per each developer, implicitly - it's right on each developers personal machine :)
And I think large scale OSS projects like Linux and Chrome are evidence that this approach works quite well.
- alinajaf 14y ago> implicitly Explicitly. You can't share branches between repos, but git does a good job of making it look like you can. master and origin/master in your repo are physically different things from master in someone elses. I don't mean to single you out but I've seen developers with really, really nutty workflows because they didn't understand this.
- groby_b 14y agoTrust me, when I say 'implicitly', I mean it. The implicit branch here is any local code. It's clearly diverging from the authoritative repo (whatever that is for your workflow and VCS) My point was that any workflow that doesn't operate in a shared source directory already has those local "branches". You might as well acknowledge it and roll with it. (Doesn't diminish your point about master & origin/master. I think this link is a propos to that: http://wheningit.tumblr.com/post/32959730634/when-the-office-git-expert-has-to-come-fix-everything http://wheningit.tumblr.com/post/32959730634/when-the-office... )
- _ikke_ 14y agoBranches in git are just pointers. If two branches point to the same commit, they're the same branch.
- bronson 14y agoIf two pointers point to the same memory location, are they the same pointer? No. Two branches are two branches, even if they point to the same commit. Update one branch, the other remains unchanged.
- alinajaf 14y agoWhat the other response said + they don't point to the same commit. No branch in your git repo can point to a commit in another repo, even if those commits have the same hash.
- Tobu 14y agoEverything I do is on the master branch, because this branch represents the focus of my attention. If there's stuff I'm unsure about I feature flip whenever possible, and if I must do large scale refactoring it happens on the main branch so that I have to get something working to get it out of the way. It only ends up as a feature branch — namespaced under discarded/ — if the refactoring doesn't pan out.