document.No parameters (1) If the stage area has, then the work area and the stage to do the comparison(2) If the stage area is not, the comparison is done in the workspace and branchCompare the head comparison workspace with the file in the repository that the head pointer points to--cache staging area and branches are compared.9, $ git rm10, $ git stash hide all tacked (modified and deleted) Change,stash
cache all generated NamespaceObject objects.A NamespaceObject object contains three attributes: stash (record the current namespace), fqn (namespace name), and proc (createProcedure object ). The methods include enqueue, call, valueof, merge, getStash, and getExport.Copy codeThe Code is as follows:74 var NamespaceObject = function _ Private_Class_Of_NamespaceObject (fqn ){75 merge (this ,{76 stash: {CURREN
provides a stash feature to "store" the current work site, and then continue to work after resuming the site:1 [[email protected] zhangtest]# git stash 2 Saved working directory and index state WIP on dev:ef9042a Dev Brach new 3 HEAD is now at ef9042a Dev Brach new 4 [[email protected] zhangtest]# git status 5 # on Branch Dev 6 Nothing to commits, working directory cleanNow, with the git status view wo
solve them manually.
When you view hello, we will find that:
Git uses
The head points to the commit of the current branch terminal.
After =======,>>>>>>> is the code on another branch that you want to merge over.
The dev after >>>>>>> is the name of the branch.
For a simple merge, edit them manually, and then remove the tags, and finally add and commit as usual.
If the conflict is too complex, you need to use a graphical interface:Git mergetool
git log--graph: View branch merge diagram. 5, Br
First, the basic action
The branch in Git is actually just a checksum containing the object (40 character length SHA-1 string)
files, so creating and destroying a branch becomes very inexpensive.
How does Git know what branch you are currently working on? In fact, the answer is also very simple, it holds a
A special pointer called head.
Create: Git branch iss53
Delete: Git branch-d iss53
Toggle: Git Checkout iss53
Create and toggle: Git checkout-b iss53
To see which branches have been m
1, coverage package implementation code Coverage (1) pip install coverage (2) Coverage run xx.py (test script file) (3) Coverage report-m print out Coverage Information Report (4) coverage in the console HTML generates a Htmlcov file in the same directoryfolder, open index.html in folders to view code coverage in a graphical interface2, Xpath Understanding(1) XPath is a language that looks for information in an XML document.XPath is used to navigate through elements and attributes in an XML docu
policy:First of all, the master branch should be very stable, that is, only to release the new version, usually do not work on it. Work is on the Dev branch, that is, the dev branch is unstable, at some point, such as the 1.0 release, then merge the Dev branch to master and Release version 1.0 on Master. Everyone has their own branch, and sometimes it's time to merge on the Dev branch.Merging branches, plus the--NO-FF parameter can be combined with normal mode, the merged history has branches,
completed in 1 days. However, the bug must be fixed within two hours, what should I do?Fortunately, Git also provides a stash feature that can "store" the current work site, and then continue to work after resuming the site:$ git stashNow, using GIT status to view the workspace is clean (unless you have a file that is not managed by git), so you can safely create a branch to fix the bug.First determine which branch to fix the bug on, assuming that yo
|\
| * 6224937 Add Merge
|/
* 59BC1CB Conflict fixed
...
When repairing a bug with a code name of 101, it is natural that you want to create a branch issue-101 to fix it
When fixing a bug, there is still work to be done but cannot be submitted can freeze progress
In your current workspace (branch)
$ git stash//freezes the current branch modification
See all Stash
$ git
a remote push Send all local tags for push to remote delete remote label store current workspace State view stored workspace State Restore specified stash delete stash restore and remove the specified stash associate a local repository with a remote repository clone project from a remote repository cloning item cannot be first in the local Init version library S
checkout-b myfeature origin/myfeature
Save content in storage points, indexes and file systems
10. Storage
In git you can put your current working state into a storage stack and then you can take it out again. The simplest scenario is the following:
$ git Stash
# do something else ...
$ git stash pop
Many people suggest usinggit stash apply来代替pop,不过如果这样做
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
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.