![]() ![]() In any case, here's a way to tackle updating local refs based on remote refs (after running git fetch -p for instance): for ref in $(git for-each-ref refs/remotes/origin/ -format '%(refname)') do If there is some other answer, (2-4) become problematic. It should not have a work directory, and perhaps it should not accept pushes either, in which case the remaining questions just go away. If the answer to (1) is "because devhost is not actually for development, but rather is a local mirror that simply keeps a locally-available copy of the github repo so that all our actual developers can read from it quickly instead of reading slowly from github", then you want a "mirror" rather than a "normal" repo. What if the remote repo has new branches added ( A) and/or branches deleted ( D)?.What if you're on some branch (e.g., C) and the work directory and/or index are modified but not committed?.What if some branch (e.g., B) has commits that the remote (github) repo lacks? Should they be merged, rebased, or.Why do you want the tips of all branches updated?.I have these obvious (to me anyway) questions: But now you say you want something to happen, on devhost, to local branches D, B, C, and/or master? You do git fetch, which brings over all the objects and updates origin/D, origin/B, origin/C, and origin/master. You are on host devhost and you are in a repo where origin is the github repo. ![]() More concretely, suppose the github repo has branches D, B, C, and master (the reason for this odd branch-name-set will be clear in a moment). If you want the local branch tips to get re-pointed after git fetch, you need some additional steps. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |