sha1 is generally used), create a tag
Git tag-l list current tag
Git tag-d [tag_name] Delete tag
With the tag, you can use git checkout [tag_name]-B [branch_name] to check the code of the corresponding tag moment. You can also use the tag name to implement diff and other functions.
10. Patch usage
Git diff filename1
a summary of some of the commands commonly used by GitGit init creates a repository git add file to submit files from the workspace to staging area git commit-m "BlaBla ..." Submit a file's staging area to the repository Git status View the current state of the repository git
Common commands and statements for Shell programming (SCRIPT) and Common commands for shellSome common Shell programming (SCRIPT) commands and statements can meet general requirements.Command Parameters received:
Number of parameters:
$ #
Parameter value:
Command itself
Git official documentationGraphical tool gitk
1. Git Basic settings
$ git config --global user.name "Your Name"
$ git config --global user.email "[emailprotected]"
$ Git config -- List View configuration records
You can also enter the working root directory and ru
One:The shell is the shell of the Linux/unix system, and it can be understood as the command line interface, where you enter and execute the command line.Bash (born again shell) is one of the shell's most commonly used shells. you run on your Linux: PS | grep $$; If you run the result as bash, it means that the current default
12 advanced Git commands you need to know
As we all know, Git is already a leader in the field of distributed version control and forms a complete ecosystem around Git. To learn about Git, you must first learn the basic workflow of Git
branches that have corresponding remote branches. Prior to Git version 2.0, the default is to use the matching method, which now defaults to Simple mode. If you want to modify this setting, you can use the git config command. (Does git push differentiate between simple and matching only without parameters?) )$ git con
delete the child module residue directory
5 Ignore some files, folders do not submit
Create a file with the name ". Gitignore" under the warehouse root, write the unwanted folder name or file, and take one row for each element, such as
Target
Bin
*.db
=====================
Git Common Commands
Git branch view all local branchesGit Status View current statusG
Summary of common shell commands and common shell commands
Umask
Set the default mode when creating a file. For a file, the maximum value is 6, and for a directory, the maximum value is 7.The system does not allow the creation of a text file to grant the executable permission, and the corresponding directory bit indi
8. find in shell commands and find in shell commands
The find command, which is commonly used like cd. however, most of the time, one or two parameters are enough. or, barely enough. however, when we take the initiative to look at the find manual, we will find that the more practical functions are not used.
This articl
1. Git Common commands: Fast query gitbranch view all local branches gitstatus view current status gitcommit submit gitbranch-a view all branches gitbranch-r view all remote branches gitcommit-am quot; init quot; submit and add comments to gitremote
I. Quick query of common Git commands
1 git init # initialize the local git repository (create a new warehouse)2git config--global user.name"XXX "# Configure user name3git config--global user.email"[email protected] "# Configure mail4git config--global color.uitrue# git status and other commands auto-coloring5git config--Global Color.status Auto6git config
Git action notes 1. Create directory $ mkdir learngit $ cd Learngitnbs p; 2. Change the new directory to warehouse $ git init 3. Add a file to the repository N Bsp $ git add readme.txt 4. Submit one or more files together to the repository $ git commit-m "wrote a readme fil E " 5. View the statu
the last committed version and marks the subsequent modifications as not added to the buffer:$ git reset Reset the head to the last committed version and leave uncommitted local modifications:$ git reset--keep The use of Git submoduleIn the development process, there are often some common parts of the hope to be extracted into a public library to provide other p
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 hi
In general, the daily use of just remember 6 commands, you can. But skilled use, I am afraid to remember 60~100 a command.Several special nouns are translated as follows.
Workspace: Work Area
Index/stage: Staging Area
Repository: Warehouse area (or local warehouse)
Remote: repository
First, create a new code base
# Create a new Git codebase in the current directory
file in two categories, whether to keep the file in the current directory, you need to keep:$ git rm–cached filename does not need to be preserved:$ git rm filenameView commit History$ git logCan. For more high-end usage, view documentsUndo ActionA revert operation similar to SVN:$ git checkout–filename.md$
Git is different from a version management system like SVN. Although familiar with common operations, it can satisfy most of the requirements. However, it does not rely on brute force to try it in case of troubles, it is necessary to understand the principles of git.File
All file version information managed by git is stored in the root directory.gitNext, let's take a look:
$ ls .gitCOMMIT_EDITMSG HEAD
Protected]:schacon/Simplegit.git* [New tag] v1.5V1.5If you want to push a lot of tags at once, you can also use --tags commands with options git push . This will send all the labels that are not on the remote repository server to that place.$ GIT push origin--tagscounting objects:1, Done. Writing objects: -% (1/1), thebytes |0BYTES/S, Done. Total1(Delta0), reuse
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.