Download vue
npm i vue-cli
Enter again
vue create xxx//xxx是自己起的项目名字
Choose the corresponding configuration according to your own needs. The blogger chose the first configuration.
generate
Enter npm i to automatically install the required dependencies (if there is already node_model in the project, you can skip this step)
npm i
Enter npm run serve to check whether the project can start normally
Project is in normal use
Now we can go to github to create a new project
github 地址 GitHub: Let’s build from here · GitHub
After logging in, go to the following page
Refresh and you will see your new project. Click to enter.
The following interface appears, which means the new creation is successful.
The next step is to set up your link to github.
Click to create a new ssh key
Go to your local terminal and enter to get the local ssh key
cat ~/.ssh/id_rsa.pub
Copy the obtained ssh key to the picture below and give it a custom name
Seeing the following interface means success
Next go to your terminal and type
git config --global user.name "孙可爱"
git config --global user.email "邮箱[email protected]"
Initialize the warehouse and add it to the commit
git add .
git commit -m "文字"
Then go back to the previous page to find the clone address
Copy the git address you just copied in the terminal and pull the remote main branch, some of which are master branches.
git remote add origin https:地址
git pull --rebase origin main
At this time, the remote readme file is pulled to the local one.
git checkout main
git push
If push is not allowed, we can create a new branch and merge it (this step may be a bit clumsy but doable)
git checkout -b 分支名
git push --set-upstream origin 分支名
git checkout main
git merge 分支名
git push
You can see that the link between the project and git is created, and then we can push as much as we want.
If you need automatic packaging function, please read the documentation