git quiz分析总结

  1. Which option should you use to set the default user name for every repository on your computer?
  • To set a name for every Git repository on your machine, use $ git config --global user.name "John Smith"

2. What is the command to set the user email for the current repository?

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

**3.**What is the command to view the history of commits for the repository?

The most basic and powerful tool to do this is the git log command.

  1. What is the command to create a new branch named "new-email"?

git branch new-branch-name

**5.**What is the command to move to the branch named "new-email"?

git checkout -b <new-branch>

  1. What is the option, when moving to a branch, to create the branch it if it does not exist?

-b

  1. What is the command to delete the branch "new-email"

git branch -d new-email

  1. What is the command to get all the change history of the remote repository "origin"?

Fetching changes from a remote repository

Use git fetch to retrieve new work done by other people. Fetching from a repository grabs all the new remote-tracking branches and tags without merging those changes into your own branches.

  1. Git Pull is a combination of:

The git pull command is actually a combination of two other commands, git fetch followed by git merge. In the first stage of operation git pull will execute a git fetch scoped to the local branch that HEAD is pointed at. Once the content is downloaded, git pull will enter a merge workflow.

LINK: https://www.w3schools.com/quiztest/result.asp

Git Fetch | Atlassian Git Tutorial

相关推荐
charlie1145141912 小时前
从零开始理解 CSS:让网页“活”起来的语言2
前端·css·笔记·学习·选择器·样式表·原生
STUPID MAN3 小时前
Linux使用tomcat发布vue打包的dist或html
linux·vue.js·tomcat·html
太平洋月光4 小时前
MJML邮件如何随宽度变化动态切换有几列📮
前端·css
自由日记6 小时前
css学习9
前端·css·学习
华仔啊7 小时前
CSS实现高级流光按钮动画,这几行代码堪称神来之笔
前端·css
hashiqimiya9 小时前
html的input的required
java·前端·html
我命由我123459 小时前
HTML - 换行标签的 3 种写法(<br>、<br/>、<br />)
前端·javascript·css·html·css3·html5·js
icebreaker10 小时前
重新思考 weapp-tailwindcss 的未来
前端·javascript·css
djk888810 小时前
极简后台框架
前端·css·css3
不坑老师11 小时前
不坑盒子的插入网页功能是完全免费的!
前端·html