Small program development (1) New/pull project, configure remote warehouse

1. Preparatory work and tools

1. Tools

WeChat developer tools, Git

2. Preparation

For the installation and configuration of related development tools, please Baidu

2. Create or pull remote projects

1. Open the WeChat developer tool (scan code login and other verification work to operate by yourself), select the applet.

2. Click the + sign to create a new project. Please choose the project name, directory, template selection, etc., the development mode is a small program, and the back-end service should be determined according to the company's specific business design.

3. AppID, if it is a new project, you can register an appID, if you are pulling an already created project, select the test number.

4. After finishing, click OK to enter the applet page.

3. Configure the remote warehouse

If you are pulling an existing project from the remote warehouse (that is, collaborative development), it is recommended to delete the files in the previous directory (that is, the project path).

1. Click version management (1 in the figure), click Initialize Git warehouse, and enter the process of initializing Git warehouse

2. Click Settings (2 in the picture), configure your Code Cloud username and email in General ; configure your Code Cloud user name and password in Network and Authentication ; add your remote warehouse address in Remote .

3. After the completion, the remote warehouse information will appear (3 in the figure).

4. Select the local branch (4 in the figure), right-click, and track the upstream branch—remote branch name.

5. Pull the project (6 in the figure). After pulling the code from the remote, if the pull error reports no merge base found, you can try: first select the remote branch, select the most recent record in the list that appears, right click, and select " Reset HEAD to xxxx"; other problems can be searched on Baidu by yourself, most of them are related to the information setting of Code Cloud, or it may be that the previous steps have not been done well

The following is the configuration required for collaborative development (pull project)

6. After pulling the code from the remote, click Local Settings, uncheck Use an independent domain for debugging, then click Basic Information, copy the appID of the project and modify it (because it is a pulled project, ask for the appID from the colleague who created the project click), and at the same time ask the project creator to add you to the developers of the WeChat Mini Program project, otherwise there will be a permission error problem

7. The configuration is complete, run the project, and start development

4. Submit and pull code

1. Select version management (1 in the figure)

2. Select the workspace (5 in the figure), check the files to be submitted in the list that appears, fill in the code description for this submission, and click Submit

3. Click push (7 in the figure), and the code submission is completed

4. To pull, just click pull directly

5. There are problems related to Gitee during operation

1、error: hook declined to update

2、GE007: Your push would publish a private email address

The above two problems are the same problem, which is caused by the code cloud setting problem. The solution: gitee —> Settings —> Mailbox Management, uncheck "Prohibit command line push to expose personal mailbox", of course, you can also uncheck it directly" Keep my email address private".

Guess you like

Origin blog.csdn.net/LoveShadowing/article/details/129300643