Preface 🌱
In the actual development, the use of tools in the development environment can intuitively reflect a person’s work output efficiency. Therefore, in the interview, the interviewer will often ask about git, Linux and other common interview questions. Therefore, it is necessary to understand the relevant knowledge points
So in the following article, will explain some of the more common development environment under the knowledge point, in order to prepare for you to use.
Let’s learn ~🌱
🌲 git
1. Why use Git?
- The most common code versioning tool;
- Large projects require collaboration and familiarity
git
; - If you knew
git
Or not beforegit
Difficult to pass the interview; Mac OS
Bring their owngit
Command,windows
Go to the official website to download;git
The common ones on the server aregithub
、coding.net
And so on;- Big companies build their own networks
git
Service.
Git commands
The command | use |
---|---|
git init | Initialize a repository |
git clone | Cloning project |
git add . | Add all the files. If there is a file name, only that file is added |
git status | Keep track of work area status |
git diff | If Git status tells you that a file has been modified, use Git diff to check the changes |
git commit -m “xxx” | Submit a row of records |
git push origin master | Submit to the server |
git pull origin master | Pull code from the server |
git branch xxx | To create new branches, everyone needs to have their own branch, without interfering with each other |
git checkout -b xxx / git checkout xxx | Switch branch |
git merge xxx | When you’re done, merge the main branches |
git stash | Put the wrong code away, then switch branches and put it back on |
git log | Before shuttling, you can view the commit history with git log to determine which version you want to fall back to |
git reflog | To go back to the future, look at the command history with Git reflog to determine which version you want to go back to in the future. |
git log –graph | You can see the branch merge diagram |
3. Git submission specification
Here is a picture of git’s specifications for submitting code. The details are as follows:
🌳 2. Chrome debugging tool
- Elements
- Network
- Console
- Application
- debugger
- Look for memory leaks and so on
🌴 3. Packet capture
1. Packet capture tool
- The mobile terminal
h5
Page,Viewing network Requests, need to use tools to capture packages; windows
In general usefiddler
Caught;Mac OS
In general usecharles
To capture packets.
2. Packet capture process
- Cell phones and computers are connected to the same LAN;
- The mobile phone agent to the computer;
- Mobile phone browsing web, you can capture the bag;
- View network requests;
- Url proxy;
https
。
🌾 4. Common Linux commands
1. Why Linux?
- The company’s online machines are usually
linux
(such as Aliyun); - The test machine also needs to be used consistently
linux
; - Test machine or line machine out of the problem, local and can not be repeated, need to go to the investigation (for example, there is no problem with other people’s mobile phone, another person’s mobile phone problems, the local environment and can not see what is wrong, this time must go to the investigation).
2. Common Linux commands
The following table:
The command | meaning |
---|---|
SSH Username @IP address, such as [email protected] | Log in to the Linux online machine or test machine |
ls | View all folders in the current file directory |
ls -a | Show the hidden folders as well |
ll | Ls is a tiled view of files, ll is a list view of all files (including hidden files) |
clear | Clear the screen |
Mkdir File name, for example, mkdir ABC | Creating a folder |
The rm file name | Delete the file |
Rm -rf Indicates the file name, for example, rm -rf ABC | Delete folders |
Mv Old file name New file name, for example, mv index. HTML index1.html | Change the name of file index. HTML to index1.html |
The TAB key | Fill in the words |
cd .. / | Back to parent directory |
Cp file name 1 File name 2, for example, cp A.js B.js | Make a copy of a.js and name the new copy b.js |
Touch file name, for example, touch B.js | Create an empty file |
Vi the file name | To add something to the file, |
Vim filename | To add content to the file, press I to enter writing, es to exit writing, :w to save, :q! Forced out of |
vimtutor | Check out the vim tutorial |
The cat filename | Print out the entire contents of the file |
The head file name | Print out the first few lines |
Tail filename | Print out the last few lines |
Grep Name of the keyword file, for example, grep Babel package.json | Query the contents of a file containing keywords |
🌿. Conclusion
The above article explains in the interview some often test development environment knowledge, for the front-end interview, the development environment related content inspection is relatively little, so we can do a simple understanding through this article.
This concludes some common knowledge about development environments. Hope to help you ~
🐣 Egg One More Thing
👉 wechat public account Monday laboratory, click the navigation bar below the interview column briefly view the keyword to obtain ~
🏷️ Update address
👉 offer comes to the interview column
That’s all for this article! See you next time! 👋 👋 👋