Quickly learn to use -Git

3. Git use

Use steps:
① preparation
1. Initialize the identity information (they do not transform a computer, can only be done once)
2. cloning Warehouse Code (download Warehouse Code) / pull the latest (pull, update)
[first day of work : cloning, followed by one day before every start is pull]
② write code (code editing, create, delete)
③ submit local repository (staging area)
④ submit to a remote repository (the day after work)

Practical operation:
① preparatory work
initialization identity information:

$ git config --global user.name “用户名”
$ git config --global user.email “邮箱地址”

Here Insert Picture Description
Clone Codes (download warehouse)

$ git clone HTTPS下载地址

Here Insert Picture Description
Here Insert Picture Description
② create t1.php, t2.php, t3.php
Here Insert Picture Description

③ submitted to the local repository

$ git add .

Here Insert Picture Description
④ submit to a remote repository

$ git commit -m “注释”
$ git push

Configuration files in the current local workspace file .git folder, the file name is called config.
Here Insert Picture Description
Here Insert Picture Description

Released 1939 original articles · won praise 2057 · Views 180,000 +

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/105142713
Recommended