gitee is a Git-based code hosting service launched by the open source Chinese community in 2013; in addition to providing the most basic Git code hosting, gitee's main functions also provide code online viewing, historical version viewing, Fork, and Pull Request , package and download any version, etc.
#The operating environment of this tutorial: Windows 10 system, Dell G3 computer.
What does gitee mean?
Gitee is a Git-based code hosting service launched by the open source Chinese community in 2013. It has now become a well-known code hosting platform in China and is committed to providing high-quality and stable hosting services for domestic developers.
Main functions
In addition to providing the most basic Git code hosting, Gitee also provides code online viewing, historical version viewing, Fork, Pull Request, packaged download of any version, Issue, Wiki, Protected branches, code quality inspection, PaaS project demonstration and other functions that facilitate management, development, collaboration and sharing.
Configuration before running Git for the first time
Git configuration git config git command
On a new system, we generally need to configure ourselves first Git working environment. The configuration only needs to be done once, and the current configuration will be used during future upgrades. Of course, you can always modify the existing configuration with the same command if necessary.
Git provides a tool called git config (Annotation: It is actually the git-config command, but you can call this command by adding a name to git.), which is specially used to configure or read the corresponding work. environment variables. It is these environment variables that determine the specific working methods and behaviors of Git in each link. These variables can be stored in three different places:
/etc/gitconfig file: Configuration that is common to all users in the system. If you use the --system option when using git config, this file will be read and written.
~/.gitconfig file: The configuration file in the user directory is only applicable to this user. If you use the --global option when using git config, this file will be read and written.
The configuration file in the Git directory of the current warehouse (that is, the .git/config file in the working directory): The configuration here is only valid for the current warehouse. Each level of configuration will overwrite the same configuration of the upper level, so the configuration in .git/config will overwrite the variable of the same name in /etc/gitconfig.
On Windows systems, Git will look for the .gitconfig file in the user's home directory. The home directory is the directory specified by the $HOME variable, which is usually C:\Documents and Settings\$USER. In addition, Git will also try to find the /etc/gitconfig file, but it depends on the directory where Git was originally installed, and uses this as the root directory to locate it.
User information configuration
The first thing to configure is your personal user name and email address. These two configurations are very important. Each time Git commits, these two pieces of information will be referenced to indicate who submitted the update, so they will be permanently included in the history along with the update content:
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com
If used-- global option, then the changed configuration file will be the one located in your user's home directory. All your future warehouses will use the user information configured here by default. If you want to use a different name or email in a specific repository, just remove the --global option and reconfigure. The new settings are saved in the .git/config file of the current repository.
If you use https to push and pull the warehouse, you may need to configure the client to remember the password to avoid entering the password every time
$ git config --global credential.helper store
Text editor configuration
The next thing to set is the default text editor. When Git needs you to enter some additional information, it will automatically call an external text editor for you to use. By default, the default editor specified by the operating system will be used, which may generally be Vi or Vim. If you have other preferences, such as Emacs, you can reset it:
$ git config --global core.editor emacs
Difference Analysis Tool
Another commonly used one is to use it when resolving merge conflicts Which differential analysis tool. For example, if you want to use vimdiff instead:
$ git config --global merge.tool vimdiff
Git can understand the output information of merge tools such as kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff. Of course, you can also specify the tools you develop yourself.
View configuration information
To check the existing configuration information, you can use the git config --list command:
$ git config --list user.name=Scott Chacon user.email=schacon@gmail.com color.status=auto color.branch=auto color.interactive=auto color.diff=auto ...
Sometimes you will see Duplicate variable names mean that they come from different configuration files (such as /etc/gitconfig and ~/.gitconfig), but in the end Git actually uses the last one.
You can also directly check the setting of an environment variable, just follow the specific name, like this:
$ git config user.name Scott Chacon
Recommended learning: "Git Video Tutorial》
The above is the detailed content of What does gitee mean?. For more information, please follow other related articles on the PHP Chinese website!