![]() The config options that will have been set by that command are: =githubī=refs/heads/new-feature2 … which has the same effects to the previous command, except for giving the branch a different name locally. Then you might instead do: git checkout -t -b add-menu github/new-feature2 However, let’s suppose that you want to give your branch a more helpful name – let’s say that’s “add-menu”. It will also checkout that new branch so that you can start working on it. … which will create a branch in your repository called new-feature2 based on github/new-feature2, and set various config options to associate your new-feature2 branch with github/new-feature2. With a recent git (>= 1.6.1) you can just do git fetch and then: git checkout -t github/new-feature2 Let’s say that you’ve set up a remote called github for that repository, and the branch there is called new-feature2. Suppose someone has told you that they’ve pushed a topic branch to GitHub that they’d like you to work on. ![]() In case you don’t want to read the whole of this post, the one sentence summary would be, “By default, git push origin will update branches on the destination with one with the same name on the source, instead of using the association defined by git branch -track, which git pull origin would use - the config option fault can change this behaviour.” However, for a more detailed explanation, read on… Although git is an excellent system, which has certainly changed my way of working for the better, occasionally one comes across an inconsistency that seems bizarre.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |