4 ms·
> 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
by 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.