Git use detailed tutorial

  1. Download MSYSGIT

    Download MSYSGIT from https://git-for-windows.github.io/ and install it. After the installation is complete, GIT appears in the start menu. You can see that there are three operating modes: GIT Bash, GIT CMD, and GIT GUI. Bash and CMD are both command-line operation modes, which are relatively straightforward, but require familiarity with GIT commands. , it is recommended to use the GUI operation mode, which is more intuitive and easy to operate.

    Git use detailed tutorial
    Git use detailed tutorial
  2.  

    Create a new repository

    Click the "Create New Repository" menu, follow the prompts to select the path to create the repository, and click the "Create" button to create a new repository. The new warehouse is originally an independent directory on the local machine. After it is established as a warehouse, a .git folder is added to save the version and other information.

    Git use detailed tutorial
    Git use detailed tutorial
  3.  

    create a new file

    Enter the local warehouse directory and create a new text file testGIT.txt. Click the Rescan button in GIT and the file appears in the UnstagedChanges list.

    Git use detailed tutorial
  4.  

    add to repository

    Click the "StageChanged" button to add the file to the staging area of ​​the repository.

    Git use detailed tutorial
  5.  

    Submit new documents

    Enter the commit version information, click the "Commit" button, and commit the new file, which adds a new file to the GIT repository.

    Git use detailed tutorial
  6.  

    Browse files in library

    Select "Browse Master's Files" in the Repositroy menu to browse the list of files in the repository.

    Git use detailed tutorial
  7.  

    Modify the file

    Open the testGIT.txt file in a local folder, edit it and save it. Click the Rescan button in the GIT GUI, and you can see that the file has entered the "Unstaged Changes" list again. Changes are displayed in the Modified Not Staged list. As with adding files, click the "StageChanged" and "Commit" buttons successively to append the changes to the warehouse.

    Git use detailed tutorial
    Git use detailed tutorial
    Git use detailed tutorial
  8.  

    View the modification history of the local repository

    Click "Visualize Master's History" in the "Repositroy" menu to display the modification history of the local repository.

    Git use detailed tutorial
    Git use detailed tutorial
  9.  

    Connect to a remote repository server

    Apply for a GIT warehouse on GitHub, connect to the warehouse on GitHub through the "Add" function in the "Remote" menu, initialize the remote warehouse and upload the local warehouse data to the remote warehouse.

    Git use detailed tutorial
    Git use detailed tutorial
    Git use detailed tutorial
    END

Precautions

 
  • The reason why GIT is called distributed version management software is that each GIT repository is a complete copy, and its operation does not require a connection to the server. You can also build a GIT server yourself, and let team members copy files from this server, which is also conducive to the development of division of labor and collaboration.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326274972&siteId=291194637