(reference) as a parameter to the command. git revert HEAD: Undo the most recent commit. Git revert creates a new, reverse commit that you can tell git not to commit by using parameter-N.git rmgit rm file: Removes files from the staging zone and also removes the working directory. git rm--cached: Removes files from the staging area, but stays in the working directory. git rm--cached is functionally equivalent to git reset HEAD, which clears the cache but does not move the working directory tr
master branch should be very stable, that is, only to release the new version, usually do not work on it;
So where do you work? Work 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 the 1.0 version in the Master branch;
You and your little friends each work on the Dev branch, and everyone has their own branch, and it's time to merge on the Dev branch.
So, the branch of teamwork looks like
the submission information for the new commit. This process essentially overrides your commit history.
LweiTranslated 8 months ago1 Person topTop translation of good Oh!
8. Stash UNCOMMITTED changesYou are modifying a bug or feature and are suddenly asked to show your work. And the work you're doing is not enough to submit, and you won't be able to show it at this stage (before you go back to the change). In this case, git
line shows the merged graph,---git log--graph--pretty=oneline--abbrev-commit-An abbreviated submission ID number on one line Git stash-The main use for this branch of the reserved storage, wait until the debugging bug succeeds, then restore the original branch to continue the next workgit stash List-used to view the display of listing information for paused hold storagegit
, if the workspace has been modified without committing, you need to commit or stash
git checkout branch--force//Toggle Branch While resetting buffers and workspaces
git checkout--force//Do not specify branch, used to clear the workspace changes (the buffer is unchanged, if there was an add, then the workspace is consistent with the buffer zone)
git reset HEAD fileName//Can undo staging area's changes (unstage)
RM test.txt//File Manager Delete files
file, you need to add a backslash "\" to escape.
4.git of Staging Area
Git's content for staging area is maintained in the . Git/index file.
Local branch and merge of 5.git
git branch: Create a branch. (Typically, a branch name, such as Master Branch Master, will typically point to the most recent commit of that branch)
git tag: Tag a specific hit, and query the tag you created. (There are two types of tag: 1. Lightweight Local:git tag "TagName" Commitno , 2. W
BranchesGit branchGit branch-aMerges the specified branch to the current branchgit merge DevDisable Fast forward when merging branches to preserve branch information and create new commitsGit merge--no-ff-m "merge with No-ff" DevDelete Branchgit branch-d DevForcibly deleting a branch that is not merged will lose the modificationGit branch-d feature1To view the branch consolidation situationgit log--graph--pretty=oneline--abbrev-commitSave the scene so you can do other things first, you can save
branch dev # Create dev branch git checkout dev # switch to dev branch git branch # View current branch git mer GE Dev -D Dev # Remove Branch devgit Stash # hold the current state and store it separately git stash list
Conflict Information>>>>>>>test then Git add,git commit, and finally you can delete the specified branch. My understanding is that a file merge branch with two identical filenames can only hold the contents of one file -, branch management git merge--no-ff-m"Merge with No-ff"Dev Use--no-FF, a new commit is generated at merge, which can be seen from the branch history, and fast forward merge does not look like it has ever been merged . -, the bug branch git
head # returns to the beginning
Git reset -- hard head ~ 3
Git reset -- soft head ~ 3
Git reset head filename # Return to unstaging or untracked from staging area without changing the content in the handling case)
Git grep
Git grep "te" V1 # Check If V1 has "te" strings
Git grep "te" # Check whether the current version contains "te" strings
Git stash inventory
Git stash # import to the repository
branch to delete the new branch, in this way, you can manage projects securely, because operations on a branch only modify the content contained in the branch, which is safer.
1 git branch
2. Branch Management PolicyFast forward mode: This mode is the default mode for Branch merge. In this mode, branch information is lost after the branch is deleted. This mode is not recommended in actual development.
1 git merge -- no-ff-m "XXX" B-name # "-- no-ff" parameter indicates disabling the Fast forwa
)Git diff-cachedView the content to be submitted next time (staged, added to index) (index version and c version)
Git diff master .. testGit diff master... Test than parent Branch
. Gitignore ignore files and do not prompt in Untracked files
Git stash stores the status at a certain time
Http://gitbook.liuhui998.com/3_6.html
Http://gitbook.liuhui998.com/4_9.html
Git Undo operation-reset, check out, And undo
============================= ===============
changes in the workspace are all revoked, that is, the file back to the last git commit or git add, when the state, mistakenly deleted file recovery.Of course, you can also use the git reset command.git loggit log--pretty=oneline log simplifies displaygit log--graph--pretty=oneline--abbrev-commit branch Merge HistoryGit reflog view connit ID record Historygit log--statGit pull pushGit pull Origin Dev remote branch to this branchCreate + Switch branch: git checkout–b nameMerge a branch to the cu
:
The application configuration settings are accessed by System.Configuration.ConfigurationSettings the GetConfig () method of the namespace and the string values of the custom configuration section, and then the result of the method is converted to the appropriate type.
For SingleTagSectionHandler, the result is converted to the IDictionary interface type of the System.Collections namespace. For NameValueSectionHan
, when merging branches, if possible, Git uses fast forward mode, but in this mode, the branch information is discarded after the branch is deleted. If you want to force the fast forward mode to be disabled, GIT will generate a new commit at merge, so you can see the branching information from the branch history. ) 20. Delete Branch $ git branch-d de v Forcibly delete a branch: $ git branch-d dev 21. View Branch consolidation $ git Log--graph--pretty=oneline--abbrev-com
called, realloc () allocates a new block).The second parameter is the new length of the block, assuming the length is smaller than the original, the block will not need to be copied. Simply tell the heap manager that the rest of the space is spare. Assuming the length is larger than the original, there is not enough space in the heap. So you want to allocate new blocks and copy the memory. ASSERT () Check to make sure that the operation was successful.(Assuming that the heap is exhausted, mallo
with normal mode, the merged history has branches, and can be seen to have been merged;- M parameter, write the commit description in)Git stash ("store" the current job site, and then continue working after resuming the site)Stash git list (view work site)/git stash apply [email protected]{0} ()Git stash POPs (restore
switch to another branch without commit modification. So we need to use the stash.git stash backup git stash pop read and resume (pop command no longer has, after apply) git stash list git stash clear empty git stash apply [stash
Related code:1.#include 2.#include 3.#include 4./* constructor with multiple parameters */#include 5.#ifndef nested_h_#define nested_h_class stack//This nested struct is called link, which includes a pointer to the next link in the table and a pointer to the data stored in the link, if the next pointer is zero, means the end of the table. {struct link/* note that although the stack has constructors and destructors, the nested class link does not, which is not to say it does not need. When
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.