:-) Just give Git the shortest name that makes it obvious, and it will go from there: origin/master is "where master was over there last time I checked", and master is "where master is over here based on what I have been doing". It's sometimes possible to create your own branch names that make it not obvious, but don't worry about that until it happens. Git normally has you refer to your own refs/heads/ as just, and the remote ones as origin/, and it all just works because it's obvious which one is which. It's that moment of fetching that makes everything match up (well, that, and the initial clone, and some cases of pushing too-basically whenever Git gets a chance to check-but see caveat below). When you do your git fetch (or git pull which is really fetch plus merge), your repo will make copies of their new work and change all the refs/remotes/origin/ entries as needed. Along the way it notes all the branches that were there, and the commits those refer-to, and sticks those into your local repo under the names refs/remotes/origin/.ĭepending on how long you go before you git fetch or equivalent to update "my copy of what's ", they may change their branches around, create new ones, and delete some. The ones named origin/whatever will initially match up with those on the repo you cloned-from: git clone ssh:///some/path/to/repo # or git://some.where. Technically there aren't actually any "remote" things at all 1 in your Git repo, there are just local names that should correspond to the names on another, different repo.
0 Comments
Leave a Reply. |