This tends to free people to try new ideas without worrying about having to plan how and when they are going to merge it in or share it with others. You can choose to share just one of your branches, a few of them, or all of them. Notably, when you push to a remote repository, you do not have to push all of your branches. Create a branch to experiment in, realize it's not going to work, and just delete it - abandoning the work-with nobody else ever seeing it (even if you've pushed other branches in the meantime). Create new branches for each new feature you're working on so you can seamlessly switch back and forth between them, then delete each branch when that feature gets merged into your main line. Have a branch that always contains only what goes to production, another that you merge work into for testing, and several smaller ones for day to day work. Create a branch to try out an idea, commit a few times, switch back to where you branched from, apply a patch, switch back to where you are experimenting, and merge it in. The creation, merging, and deletion of those lines of development takes seconds. Git allows and encourages you to have multiple local branches that can be entirely independent of each other. The Git feature that really makes it stand apart from nearly every other SCM out there is its branching model.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |