Original: "Pro Git"
Almost every version control system supports branching in some way. Using branching means that you can detach from the development main line and then continue to work without affecting the mainline. In many version control systems, this is an expensive process and often requires creating a full copy of the source code directory, which can take a long time for large projects.
Some people refer to Git's branching model as a "must-k
Git operations-branch management (2), git operation branch managementResolve Conflicts
Scenario: Create a new branch feature1 and then add it to the readme.txt file.4 create a branch na
information metadata that points to the tree object (root directory):
Make some changes and commit again, this time the commit object will contain a pointer to the last commit object (that is, the parent object in). After two commits, the warehouse history will look like this:
A branch in Git is essentially a mutable pointer to a commit object .
as an example, we created the feature branch to add some functionality to the server-side code and server then submitted C3 and C4. Then add another branch from the C3 place client to make some corresponding modifications to the client code, so the C8 and C9 are submitted. Finally, it goes back to server the branch an
disappointing ).
Feature branches often exist only in the developer's repository, rather than in the origin.Create a feature Branch
When developing new features, create feature branches from the develop branch.
$ Git checkout-B myfeature developSwitch to a new
Git Branch is more flexible, if you use the branch when there is no good plan, will make the branch too much, in the merger when there are various problems, so must be in the team management of the branch have reasonable planning
myfeatureupdating ea1b82a. 05e9557 (Summary of changes) $ git branch-d myfeaturedeleted branch myfeature (was 05e9557). $ GIT push origin developThe NO-FF flag causes the merge operation to create a new commit object, even if the merge operation can be fast-forward. This av
command:
Git branch [new-head-name] [reference-to-(B)]
Or, for example:
Git branch fix-headers head^
This command creates a new head with the specified name, and the head points to the specified commit object. If the Commit objec
commit object, which automatically moves forward each time it commits. Before we mentioned a pointer called Head, which represents the version of your current commit, this head is exactly a pointer to the local branch you are working on.Management of 3.Git BranchesGit wants to create a new branch pointer, such as crea
This article commands:
The configuration display color is: git config--global color.ui true
to set aliases to commands: Git config--global alias.co checkout
View remote repositories: Git remote-v To
create a remote warehouse branch: git checkout-b dev origin/dev
Create
amazing, you can see that some commits are done by branch?The following starts the actual combat.First, we create the dev branch and then switch to the dev branch:$ git checkout-'dev'git checkoutThe command plus -b parameter represents creation and switching, equivalent to the following two commands:' Dev 'Then, use t
code involved in the version information to 1.2, in addition, users need to write according to their own projects suitable bump-version.sh) git commit-a-M "bumped version number to 1.2"16, in a short period of time, on the "Release branches", we can continue to fix the bug. In this phase, the incorporation of new features is prohibited, and new features should b
[Git] The Branch Model of the branch git is called the "killer feature" because it distinguishes git from the version control system family. What's special about git? Git
the--NO-FF parameter of the previous command mean?By default, Git performs a fast-forward merge (Fast-farward merge) that directly points the master branch to the Dev branch.Let me give you an example:If we have a branch of this version:Now that you have an urgent bug to fix, let's set up a branch for that urgent prob
In software development, bugs are like a routine, with bugs that need to be fixed, and in Git, because the branches are so powerful, each bug is repaired by a new branch, after the repair, the branch is merged, and then the temporary branch is deleted.When you receive a bug
. a group of commits), is a true headache in the latter situation, whereas it was easily done If the--NO-FF flag was used. Release Branches
May branch off from:
develop
must merge back to:
Develop and master
branch
naming convention: release-*
The release branch is used to make the release. When develop has a releas
Through the previous two articles in this series (see series: HTTP://WWW.CNBLOGS.COM/JEREHEDU/P/4607599.HTML#BBKZ), we already know how to use Git to do version control of the file. This time we continue to learn how to manage branching through git.First, we need to figure out what a branch is. With the git log command we can view the repository's commit log,So w
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.