the branch, and then delete the temporary branch.
git stash: The current work site "storage", and so on after the resumption of the site to continue to workgit stash list: View the job site just now git stash apply : Reply to work sitegit stash drop: Delete Stash Conte
to be disabled, Fast forward git will generate a new commit at merge, so that branching information can be seen from the branch history
git merge --no-ff -m "merge with with no-ff" devPrepare to merge the Dev branch, note that the --no-ff parameter means disable Fast forward, because this merge creates a new commit, so with the-m parameter, write the commit description in
Bug BranchGit also provides a stash function that can "store" the
checkout: readme.txtplease, commit Your change s or stash them before you can switch branches.
The solution to this problem is the git stash command.
The command can get the middle state of the working directory-that is, the modified tracked file and the staged change-and save it to a stack of unfinished changes that can be re-applied at any time.
After running the "git
After mastering the basics of Git use, you may encounter some common problems. The following are some of the problems that cat Brother screening summary, share to friends, master the points in these questions, Git advanced also completed, it contains the following sections:
How to modify Origin warehouse information
How to configure Git ssh keys
How to undo Changes
How to solve the conflict
Git stash/alias/submodule usage issu
Restore"Git checkout--Create SSH Key$ ssh-keygen-t rsa-c "[Email protected]"Associate a remote warehouse Xx.git remote Warehouse AddressGit remote add Origin xx.gitThe first time you push all the contents of the master branchGit push-u Origin MasterTo 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.git clone xx.gitView B
file to the previous version: git reset -- hard HEAD ^
View Command records: git reflog
Branch Operations
Create branch: git branch dev
Create and switch to the branch: git checkout-B dev
Switch branch: git checkout master
Delete branch: git branch-d dev
Merge with current branch: git merge dev
View branch: git branch
Remote warehouse operations
Create an SSH Key: ssh-keygen-t rsa-C "youremail@example.com"
Cl
When working with Git pull code, colleagues often encounter conflicting situations, prompting the following information:
Error:your local changes to ' C/ENVIRON.C ' would is overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.
This means that there is a conflict between the updated content and the locally modified content, either by committing your changes or by temporarily storing the local changes first.
/**
* 1, the null judgement of the string org.aphche.commons.lang.StringUtils
*/
Checks If a String is empty ("") or null.
SYSTEM.OUT.PRINTLN (Stringutils.isempty (null)); True
System.out.println (Stringutils.isempty ("")); True
System.out.println (Stringutils.isempty ("")); False
System.out.println (Stringutils.isempty ("Bob"));//False
System.out.println (Stringutils.isempty ( " Bob ")); False
//Checks If a String is whitespace, empty ("") or null.
SYSTEM.OUT
Tstrings is an abstract class that, in actual development, is the most applied except for the basic type.General usage We all know, now to discuss some of its advanced usage.Let's start by listing several properties to be discussed:1, CommaText2, Delimiter Delimitedtext3, Names Values ValuefromindexLet's look at the first one: CommaText. How to use it? To speak in code:Constconstr:string = ' aaa,bbb,ccc,ddd ';VarStrs:tstrings;I:integer;BeginSTRs: =
personally configure the version that I don't want to upload to the server.So the choice of stash is to temporarily save the current file.At this point, the Java file in eclipse will be restored, and one more stash record will be saved with the files previously restored.Because this time the file has been restored, as well as the previous version of the history of the same, so can pull. We do pull.After th
/dev merges branch Dev with the current branch
Disable Fast forward Merge: $git merge--no-ff-m "comment" Dev
Fetch: $git pull gets and merges the current branch
Stash : Staging: $git Stash "Store" the current work site (git stash push) to view the job site: $git stash List recovery does not delete: $git
Deferred Helper (3132)When is a helper method for delaying object deferred. var DFD = $. Deferred (); Create a deferred object DFD. Done (); Dfd.fail (); Used: $.when (). done (); $.when (). fail ();The return value of when, is a lingering object.Source: Return Deferred.promise ();As an example: when you can wait for multiple lingering objects to succeed, the trigger succeeds.Example: (1)Success must be successful for more than one. function aaa () {var DFD = $. Deferred
The use of Delphi tstringlistTstrings is an abstract class that, in actual development, is the most applied except for the basic type.Tstringlist Common Methods and properties:VarList:tstringlist;I:integer;BeginList: = tstringlist.create;List.add (' Strings1 '); AddList.add (' Strings2 ');List.exchange (0,1); ReplacementList.insert (0, ' Strings3 '); InsertI: = List.indexof (' Strings1 '); {The first occurrence of a position}List.sort; Sortlist.sorted: = True; {Specify sort}List.count; TotalList
the prototype chain of another object.For differences between the two methods, see JavaScript isPrototypeOf vs instanceof usage.
Only use prototype chain for inheritance
Disadvantages: 1. The prototype property of the reference type value will be shared by the instance; 2. When creating a child-type instance, parameters cannot be passed to the super-Type constructor.
functionFather(){this.name ="father";this.friends = ['aaa','bbb'];}functionSon(){}So
: JavaScript isprototypeof vs instanceof usage
Using only the prototype chain to implement inheritance
Disadvantages: 1. The prototype property of the reference type value is shared by the instance; 2. You cannot pass arguments to a superclass constructor when you create an instance of a subtype
Functionfather () {
this.name = "Father";
This.friends = [' aaa ', ' BBB '];
}
Functionson () {
}
Son.prototype = Newfather ();
Son.prototype.constr
Branch
Create branch: git branch name
Switch branch: git checkout name
Create + switch branch: git checkout-B Name
Merge a branch to the current branch: git merge name
Delete branch: git branch-D name
11. Merge conflicts
When git cannot automatically merge branches, the conflict must be resolved first. After resolving the conflict, submit it again and merge it.
Run the GIT log-graph command to view the branch merge graph.
-- No-FF parameter, disable "Fast Forward": git merge -- no-FF-M "merge
--no-ff parameter can be combined with the normal mode, the merged history has branches, can see that there has been a merger, and Fast forward merge will not be seen to have been merged. (8) Staging management: When fixing a bug , we fix it by creating a new bug Branch, then merging and finally deleting the branch. When the work is not finished, first put the work site git stash , and then go to fix the bug, repair, then git
File: New filegit stash -uShow All stashesgit stash listGo back to the state of a stashgit stash apply {n}>Go back to the last stash state and remove this stashgit stash popDelete all the stashgit stash clearTo take out a file mo
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.