I. A complete branch file upload process:
- Git branch —- View the current branch
- Git status —- Check the current file status
- Git add. —– upload all the modified files to the staging area
- Git status —– You can check the status again
- Git commit -m “comment” —- place this change in your local repository
- Git status —- Check the status again
- Now the local code is up to date, but the code cloud is still the old upload code cloud
- Git push —- upload content from local storage to the code cloud
- Git branch — you can see that it is still in the branch, and the main branch of the code cloud is still old:
- Git checkout master —- switch to the main branch
- Git branch —- Check whether to switch to the primary branch
- Git merge goods_cate — Merge files in the Goods_cate branch
- Merged into the main branch; At this time the merge is in the local warehouse
- Git push —– upload the merged master branch to the code cloud;
- Completed all procedures of branch upload;
- CLS + Enter: Clear the terminal;
2. A complete branch creation process:
- Git checkout master —- First switch to the main branch
- Git branch —– Check whether it is on the primary branch
- Git checkout -b goods_params —– Create a new branch
- Git branch —- Check which branch you are currently on (see you are already on a new branch)
- Then upload your local Goods_params to the cloud:
- Git push -u origin goods_params —- -u origin goods_params —- git push -u origin goods_params —-
Iii. A complete submission process:
- Git branch — See which branch you are in
- Git status — Check the status of the current file
- Git add. — Add all changes to the staging area
- Git status —- Check the file status again
- Git commit -m
- Commit the current changes to the local repository
- Git status — Check the status of the current file again
- Git push — upload the content stored in the local repository to the code cloud while the code in the main branch is still old, switch to the main branch and update the main branch code
- Git checkout master — switch to the master branch
- Git branch — Check to see if you are in the main branch
- Git merge goods_params — Actively merge the contents of a branch. This is the local version of the post merge
- Git push – upload the merged master branch to the code cloud
This completes a complete upload operation