Debug branchDuring the normal development of a project, previously released versions may have bugs. In this case, you need to stop the current development task, fix the bug first, and then come back to continue the development task after the bug is fixed. Stash in git provides a function to save the site, which can save the content in the current workspace and temporary storage area without committing, and then fix the bug. After completion, restore the site and continue development work. The example is as follows: Stop the current work, fix a bug in the master branch, and modify the dailyfresh/settings.py file The original content of language and time zone is
Change the language and time zone to
1. Check the current status
2. Save the scene
Check the current status again and find that it is clean
3. Switch to the master branch
4. Create a temporary branch to fix bugsThis branch will be deleted after use
5. According to the above design, modify the language and time zone of the dailyfresh/settings.py fileas follows LANGUAGE_CODE = 'zh-Hans' TIME_ZONE = 'Shanghai/Asia' Add: Add changes in the workspace to the staging area Note: The current directory is the directory where the manage.py file is located
Submit: Submit the contents of the temporary storage area to the warehouse area
6. Switch back to the master branch
7. Merge the bug001 branch into the master branchBecause temporary branches will be deleted after use, you cannot query the history through branches. Therefore, when using temporary branches, you need to use the no-ff method and write the -m comment information.
Push to server
8. Delete temporary branch bug001
9. Switch back to the working branch zhujiao
View the site list
Restoration site
Check the work status after restoring the site
You can continue developing in this branch This is the end of this article about learning Git for one minute every day to view Debug branches and repair them. For more relevant Git viewing Debug branches and repair content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL deep paging (how to quickly paginate tens of millions of data)
>>: Flex layout makes adaptive pages (syntax and examples)
The previous article introduced the installation ...
How much do you know about HTML? If you are learni...
I just started learning database operations. Toda...
Table of contents Problem description: Cause Anal...
Table of contents 1 Use of v-if and v-show 2. Dif...
Copy code The code is as follows: <html> &l...
Many people have been told how to compile from th...
In web development, you often encounter characters...
Table of contents 1. Digital Enumeration 2. Strin...
General mobile phone style: @media all and (orien...
1. Advantages and Disadvantages of Indexes Advant...
Table of contents 1. Get to know Teleport 2. Basi...
1. INSERT INTO SELECT statement The statement for...
Table of contents What is a Binary Search Tree (B...
As a required course for front-end developers, CS...