With the popularity and use of WeChat mini programs, more and more developers have begun to upload their own mini programs to code hosting platforms for management and sharing, among which gitee is the first choice for many developers. But for novices, they may encounter some problems, so this article will introduce in detail how to upload gitee to WeChat applet.
1. Register a gitee account and create a warehouse
First, we need to register an account on gitee and create a new warehouse so that we can upload small programs to the warehouse.
1. Enter gitee.com in the browser to enter the official website, click the "Register" button in the upper right corner, and fill in the necessary information to register successfully.
2. After successful registration, we can log in to our gitee account. After entering the gitee homepage, click the "plus" button in the upper right corner and select "New Repository" to create a new code repository.
3. In the create warehouse page, fill in the name and description information of the warehouse, and select public or private, then select "Initialize git warehouse" and select "Node.js" as the language of the code warehouse, and finally click Click the "Create Warehouse" button to create it successfully.
2. Upload the WeChat applet to gitee
Next we need to upload the WeChat applet to the gitee code repository. Here we take the Windows system as an example. The steps are as follows:
1. Open the WeChat applet development tool, enter the applet project we want to upload, and select "Tools" -> "Build npm" in the menu bar.
2. After the construction is completed, find the "miniprogram_npm" folder in the mini program project directory in the file explorer, copy it to the project directory, and delete the original "node_modules" folder.
3. Enter the project root directory, right-click and select "Git Bash Here" to open the Git Bash terminal.
4. Enter the following command in the Git Bash terminal to initialize git:
$ git init
5. Associate the gitee warehouse we just created with the local git warehouse, the command is as follows:
$ git remote add gitee <gitee></gitee>
Note: You need to replace the address in with the address of the gitee warehouse we created.
6. Add all files in the current directory to the local git repository, the command is as follows:
$ git add .
7. Submit our local code to the git repository, the command is as follows:
$ git commit -m "Initial commit"
Note: "Initial commit" is the comment for this submission, which can be modified according to the actual situation.
8. Push the local code to the gitee warehouse, the command is as follows:
$ git push gitee master
Note: "gitee" in the command is the remote warehouse alias we added before, and "master" is our current The name of the branch where it is located shall be modified according to the actual situation.
9. After the upload is successful, refresh the gitee warehouse page and you can see the small program code we uploaded.
3. Update the WeChat applet to gitee
After we make modifications locally, we need to upload the updated code to the gitee warehouse. At this time, we only need to perform the following steps :
1. In the project root directory, right-click and select "Git Bash Here" to open the Git Bash terminal.
2. First update the local git library, the command is as follows:
$ git pull
3. Upload the local code to the gitee warehouse, the command is as follows:
$ git push gitee master
So far, we The WeChat applet was successfully uploaded to the gitee code hosting platform. Hosting our mini program code through gitee not only facilitates version management, but also allows us to share and communicate with other developers, promote code exchange and improvement, and make mini program development more convenient and efficient.
The above is the detailed content of How to upload gitee to WeChat applet. For more information, please follow other related articles on the PHP Chinese website!

Git and GitHub are essential tools for modern developers. 1. Use Git for version control: create branches for parallel development, merge branches, and roll back errors. 2. Use GitHub for team collaboration: code review through PullRequest to resolve merge conflicts. 3. Practical tips and best practices: submit regularly, submit messages clearly, use .gitignore, and back up the code base regularly.

Git and GitHub are not the same thing: Git is a distributed version control system, and GitHub is an online platform based on Git. Git helps developers manage code versions and achieve collaboration through branching, merge and other functions; GitHub provides code hosting, review, problem management and social interaction functions, enhancing Git's collaboration capabilities.

After installing Git, in order to use more efficiently, the following settings are required: Set user information (name and mailbox) Select text editor Set external merge tool Generate SSH key settings Ignore file mode

Resolve: When Git download speed is slow, you can take the following steps: Check the network connection and try to switch the connection method. Optimize Git configuration: Increase the POST buffer size (git config --global http.postBuffer 524288000), and reduce the low-speed limit (git config --global http.lowSpeedLimit 1000). Use a Git proxy (such as git-proxy or git-lfs-proxy). Try using a different Git client (such as Sourcetree or Github Desktop). Check for fire protection

Causes of slow Git downloads include poor network connections, Git server problems, large files or large submissions, Git configuration issues, insufficient computer resources, and other factors such as malware. Workarounds include improving network connectivity, adjusting firewall settings, avoiding downloading unnecessary files or submissions, optimizing Git configuration, providing adequate computer resources, and scanning and removing malware.

How to update local Git code? Use git fetch to pull the latest changes from the remote repository. Merge remote changes to the local branch using git merge origin/<remote branch name>. Resolve conflicts arising from mergers. Use git commit -m "Merge branch <Remote branch name>" to submit merge changes and apply updates.

Steps to update git code: Check out code: git clone https://github.com/username/repo.git Get the latest changes: git fetch merge changes: git merge origin/master push changes (optional): git push origin master

You can delete a Git branch through the following steps: 1. Delete the local branch: Use the git branch -d <branch-name> command; 2. Delete the remote branch: Use the git push <remote-name> --delete <branch-name> command; 3. Protected branch: Use git config branch. <branch-name>.protected true to add the protection branch settings.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.