as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev b
to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is done halfway through, and we're not able to commit it, such as my branch Bug, which takes 2
branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is don
provides a stash feature that can "hide" the current work site, and then continue to work after resuming the site later. As follows:So now I can fix the bug by creating a issue-404 branch.First we want to make sure that the bug is fixed on that branch, for example, I'm now fixing it on the master Branch master, and now I'm going to create a temporary branch on the Master branch, which demonstrates the following:After the repair is complete, switch to
in general in the new Dev branch work, after the completion, such as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we ca
corresponding hello.txt file and find that the two lines you modified exist in the file in this form:
In this way, the content in different branches is marked and you need to manually change it and submit it with $ git add hello.txt and commit-M.
Use the $ git log with parameters to view the merging information. Take note of the parameters later.
$ git log --graph --pretty=oneline --abbrev-commit
3. Temporary Storage work site
You often encounter a situation where you are creating a new funct
DevGit add read.txtGit commit-M "Dev"Git checkout master(Note that the next parameter -- no-FF indicates that fast forward is disabled)(Fast Forward merge does not show that it has been merged, but the -- no-FF parameter merged has branches. Negative shows that it has been merged)Git merge -- no-FF-M "merge with -- no-FF" Dev(View the branch history git log -- graph -- pretty = oneline -- abbrev-commit)
Bug branch (the bugg branch is the branch to solve the bug)Idea: when there is still a job
, for example, to publish, or after the dev branch code is stable, it can be merged to the master branch.
7. Bug Branch:
During development, bugs are often encountered, so Bugs need to be fixed. In git, the branches are very powerful, and each bug can be fixed through a temporary branch, after the repair is completed, merge the branches and delete the temporary branches.
For example, when I receive a 404 bug during development, we can create a 404 branch to fix it. However, the work on the curre
[offsite]$ ssh-add Enter passphrase for /home/accountname/.ssh/id_dsa: (enter passphrase) Identity added: /home/accountname/.ssh/id_dsa (/home/accountname/.ssh/id_dsa)
Now, when we access server1, we will not be prompted to enter the password:
[Offsite] $ ssh accountname@server1.com[Server1] $ exit
If you do not believe this yet, try removing the (kill-9) ssh-agent process and then reconnecting to server1. This time, you will notice that server1 will ask for the password
corresponding hello.txt file and find that the two lines you modified exist in the file in this form:
In this way, the content in different branches is marked and you need to manually change it and submit it with $ git add hello.txt and commit-M.
Use the $ git log with parameters to view the merging information. Take note of the parameters later.
$ git log --graph --pretty=oneline --abbrev-commit
3. Temporary Storage work site
You often encounter a situation where you are creating a new funct
git checkout-b dev # create dev branch, then switch to Dev Branch
The git branch command lists all branches, with an * number in front of the current branch
git merge Dev merges the work of the Dev branch into the master branch
git branch-d Dev removed the dev branch
Git merge--no-ff-m "merge with No-ff" Dev merges the branch code--NO-FF parameter, which means that fast forward is disabled so that branch information can be seen from the branch history.
Git
branch should be very stable, that is, to release the new version, generally do not allow work on the above, work in general in the new Dev branch work, after the completion, such as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the re
branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is done halfway through, and we're not able to commit it, such as my branch Bug, which takes 2 days to complete, bu
to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is done halfway through, and we're not able to commit it, such as my branch Bug, which takes 2
as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev b
, whenever necessary, you can use the command GIT push Origin master to push the latest changes;Remote Library cloningTo clone a warehouse, you must first know the address of the warehouse and then clone it using the git clone command.GIT supports multiple protocols, including HTTPS, but the native GIT protocol supported by SSH is the fastest.View branches: Git branchCreate a branch: Git branch Switch branches: git checkout Create + switch branches: git checkout-b Merge a branch to the current b
to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is done halfway through, and we're not able to commit it, such as my branch Bug, which takes 2
as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev b
in general in the new Dev branch work, after the completion, such as to publish, Or, if the dev branch code is stable, it can be merged into Master Branch master.Seven: Bug branches:In the development, will often encounter bug problems, then there is a bug need to fix, in Git, the branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we ca
branch is very powerful, each bug can be repaired by a temporary branch, after the completion of the repair, merge branches, and then delete the temporary branch.For example, when I get a 404 bug in development, we can create a 404 branch to fix it, but the work on the current dev branch is not yet committed. such as the following:It's not that I don't want to commit, but the work is done halfway through, and we're not able to commit it, such as my branch Bug, which takes 2 days to complete, bu
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.