1. Git basic commands
Create
Copy project: git clone warehouse address
Create branch: git branch branch name
Enter branch: git checkout branch name
Create and enter branch: git checkout -b branch name
Upload
View status: git status
Add all files: git add.
Submit: git commit -m'Submit description'
pull: git pull
push: git push
View
View all local branches: git branch --list
View all branches (including remote branches): git branch -a
Delete
Delete local branch: git branch -d branch name
Delete remote warehouse branch: git push origin --delete branch name
2. Build the project
2.1 Enter gitub official website to create a project first
2.2 Build project information
2.3 Copy Https address
2.4 New local warehouse
2.4.1 Right-click to open git bash
(you can click the official website to download without Git )
2.4.2: git clone address
(Https address copied just now)
2.4.3:
Enter the generated folder
Right-click and select git bash and
use the git branch command to know that you are currently in the main branch
git branch dev. The
new branch is named dev, and the name can be anything you want
git checkout dev
enter dev
**git push **
upload branch
copy input git push --set-upstream origin dev
The branch upload is successful.
Similarly, you can create a new branch to start the project, and record the version
3 upload project
How to upload remote warehouse after some projects are completed
View status: git status
Add all files: git add.
Commit: git commit -m'Submit description'
pull: git pull
push: git push
Enter the above commands in turn to
view the current status, add all files, submit the selection description content,
and you can not use git pull and
finally git push for personal development.