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

相关推荐
ヤ鬧鬧o.3 小时前
多彩背景切换演示
前端·css·html·html5
结衣结衣.5 小时前
protobuf介绍与快速上手
java·服务器·html
这儿有一堆花6 小时前
CSS 拟真光影设计:从扁平到深度的技术复盘
前端·css
_OP_CHEN6 小时前
【前端开发之CSS】(三)CSS 常用元素属性宝典(上):从字体到文本,手把手教你打造高颜值网页!
前端·css·html·网页开发·文本属性·字体属性·页面美化
松涛和鸣10 小时前
62、IIC通信解析
服务器·arm开发·单片机·嵌入式硬件·html
朝阳3911 小时前
CSS-in-JS(含样式化组件 styled-components)
css
ヤ鬧鬧o.12 小时前
HTML多倒计时管理
前端·javascript·css·html5
DreamNotOver12 小时前
Django 模板 {% if %} 标签空格被自动删除?VS Code 环境解决方案
django·html·格式化·空格
码上出彩12 小时前
H5+CSS3响应式设计实战:基于Flex布局的适配方案
前端·css·css3
你说爱像云 要自在漂浮才美丽12 小时前
【HTML5与CSS3】
前端·css3·html5