* The following is the operation of the local warehouse"Submit files to the local warehouse"git add filename adds file to staging areagit status to see if any files have not been submittedgit commit-m "submitted notes" to submit files to the warehousegit diff file name View the modified part of the file------------------------------------------------------------------------------------------------"Version fallback"
Common git commandsInitializationGit init plus-bare for remote repositoriesConfigurationgit config user.name icocosConfigure globalgit config-global user.name Icocosgit config-global user.email [email protected]Stategit statusAdd to Ganggit add icocos.mSubmitgit commit icocos.m-m "comment"Log recordgit logGit log + file nameGit reflog all recordsBack"1 before submissionGit checout icocos.mgit reset-hard HEAD Note: There is no ^"2 after submissiongit r
Git status View the status of the local repository, such as which files were added and which files were modifiedgit checkout restore the file to its previous state (dangerous operation, will lose the file modification)git Add. Merge the newly modified content into the local repositoryGit commit-m "This is new update" submits the newly modified content to the local repositoryNote that the local warehouses ar
Add to Staging Area (stage)git add To view the staging area status of a workspacegit statusSubmit from staging area to latest versiongit commint-m "comment"Compare the differences between the latest version of the workspace and the repository:git diff HEAD--readme.txtView history, you can append parameters to each record line display:--pretty=onelinegit logFallback to previous version (plus one ^ for the last version)
版本之间文件的区别10 Deleting filesRM' version name '11 branchesView all current branchesGit branchCreate a branch and use it to workgit checkout-b branch NameQuickly merge to another branch with a new versionGit Merge branch nameDelete Branchgit branch-d nameSwitch branchesGIT Branch Branch NameResolve ConflictsDifferent changes were made to the same file in branch 1 and branch 2 respectively, creating a conflict when attempting a branch mergeYou can edit the conflicting file in one of the branches, the
compressed document, unzip it into the/tmp directory, enter the/tmp/software directory, and then execute the following three commands:1./configure 2 make 3 sudo make installegInstall dependent packages0. sudo apt-get install build-essential1. UnzipTAR-ZXF nagios-4.0.2.tar.gz2. Enter the catalogueCD nagios-4.0.23. Configuration./configure--prefix=/usr/local/nagios4. CompilingMake all5. InstallationMake install make Install-init make Install-commandm
CD catalog, enter directorymkdir catalog, creating catalogsVI I, go to editESC, exiting EditHow git diff exits: qPress the ESC key to jump to command mode, and then:: w save file but do not exit VI: W file saves the modification to file and does not exit VI: w! Forced to save, do not launch VI: Wq save file and Exit VI: wq! Force the file to be saved and exit VIQ: Do not save file, Exit VI: q! Do not save file, Force exit VI: e! Discard all changes an
Sublime selecting tags and their contentsCtrl+shift+a Continuous Press two timesGit undo AddResets the specified file for staging area, consistent with the last commit, but the workspace remains the samegit reset [file]Undo CommitResets the specified file for staging area, consistent with the last commit, but the workspace remains the samegit reset [file]Reset staging area to workspace, consistent with last commitgit reset--hardView git historygit log
Submission ProcessView file changes and new filesgit statusAdd new Filegit add your_file_path // Add all Files git add */ / Add some type of fileSubmit File" Commit Message "Submit all your modified files and add files' your message 'Undo Modify a fileGit checkout--Discard all local modifications--hard Origin/masterUpdate RelatedUpdate Remote CodeGit pullShow merge conflict filesGit diffView a merge conflict fileGit diff--base Add post-conflict
git clone [email protected]:jiet213/ui_main_function.git//Copy remote file repository to localgit status//view project status informationgit Add. Adding locally modified filesGit commit-m. Submit a local modification fileGit push origin master//push local repository to GitHubGit pull Origin master//pulling from GitHub to the local source repositoryGit branch//View Project BranchGit checkout-b host//Add a branch named hostgit checkout master//switch to
1. Open the folder in your project and enter the following commandGit initAfter you lose the command above, a. Git folder appears in the folder, as shown in the other files will also appear blue small question mark2. Add all Filesgit Add.Note that the last point is useful.After the input is complete, the folder looks like this3. Submit all DocumentsGit commit-m "Here is the note information"-AWhen you are finished, the folder appears as followsThere w
PushPush changes to remote. (If the remote doesn ' t has the branch, the branch would be created)git push Renaming a branch (a complete version of Push command)This can deletes a remote branch by providing empty local branch name.git push References:https://help.github.com/articles/pushing-to-a-remote/Http://stackoverflow.com/questions/2765421/push-a-new-local-branch-to-a-remote-git-repository-and-track-it-
Git commit commits a modificationGit branch branchname Create a new branch of BranchnameGit merge branchname merge the current branch with the Branchname branchGit rebase branchname to set the parent node of the current branch to BranchnameGit reset head~1 used locally, roll back to the previous node in HEADgit revert HEAD in the need to commit the remote revocation, undo the current changes, will create a new nodegit tag v0 C1 set a v0 tag for C1git
text in the current word match eitherI: Inserting text at the beginning of a lineO: Insert a blank line after the current lineO: Insert a blank line before the current line: Wq Command mode, execute save to exit operation: In w command mode, perform a disk operation: w! Command mode, perform a forced disk operation: Q Command mode, perform exit VI operation: q! Command mode, perform a forced exit VI operation: E filename Command mode, open and edit files: n Command mode, if multiple files are o
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.