Introduction to Git

Git is an open source distributed version control system for agile and efficient handling of any project, small or large.

Clone repository

Clone the remote repository locally, make modifications locally, and commit to the remote repository.

Create repository

Create a repository locally and push the local repository to the remote repository. Regarding the use of naming conventions for code repositories, use the KebabCaseLower nomenclature.

Naming policyOriginalConverted
PascalCaseHelloShopHelloShop
CamelCaseHelloShophelloShop
SnakeCaseLowerHelloShophello_shop
SnakeCaseUpperHelloShopHELLO_SHOP
KebabCaseLowerHelloShophello-shop
KebabCaseUpperHelloShopHELLO-SHOP

Local warehouse settings

Git settings include global settings and repository settings, and multiple remote repositories can be set up.

Documentation

Create a file named README.md in the repository to store the documentation for the repository. Of course, each folder should have a documentation if possible.

ignore file

The role of the gitignore file is to specify files that do not need to be submitted to the code repository, such as compiled files, log files, etc.

https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

Routine operation

Fetch, pull, commit, push, sync, rollback, label, conflict, staging (row), pull.

branch management

Repository branches are used to manage versions of the repository, such as master, develop, release, hotfix, feature, etc. The main operations include: creating branches, switching branches, merging branches, and deleting branches.

Repository management

Browse repositories, manage repositories, work with multiple repositories, resolve merge conflicts.