1. Git and GitHub
Git is a free and open-source distributed version control system for agile and efficient processing of any large or small projects.
GitHub is a website that provides users with the GIT repository hosting service. It is an open-source code library and version control system. You can find a lot of open source code on GitHub for easy learning.
Ii. Install git (for Windows)
1. Download http://git-scm.com/download/ on this website
2. Keep going next. (PS: during this period, you can customize the installation path .)
3. After the installation is successful, you can find the GIT logo on the desktop. Double-click it and a black box will pop up.
4. Start configuration.
Git config -- global user. Name "your name"
Git config -- global user. Email "your email"
Note: The information name configured here is the user name on GitHub, And the email is the one displayed on GitHub. (Currently I use this method), but you can also set different user names and emails for different repositories.
Skills1: You can enter git config -- list to check whether your configuration is correct.
Skills2: You can also use git config user. Name and git config user. Email to view your username and email settings.
5. You can manually create a folder or create a folder by running commands in git. The following is a command to create a folder:
Command explanation: CD/drive letter #### convert drive letter
Mkdir file name #### create a folder
PWD #### display the current directory
6. Change the Created directory to a repository as follows:
Command explanation: git init #### this is an empty repository. Now, there is one more in the directory. git Directory, which is a hidden directory, used to compile the total version library. Therefore, do not manually repair the files in this directory.
7. Add a file to the repository, as shown in:
Command explanation: git add file name ### use this method to add files
Git commit-M "Enter the submission description" #### enter the description for this submission. You can enter any content, but entering meaningful content can help you view the history.
Note: You can add multiple continuous add files. You can commit multiple files at a time.
To be continued ......
How to Use git -- (1)