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

相关推荐
糖糖TANG1 小时前
从零开始制作我的第一个静态网页——教师节主题首页开发记录
html
会豪1 小时前
CSS 动画属性精讲:从基础到实战
前端·css
前端Hardy17 小时前
HTML&CSS: 谁懂啊!用代码 “擦去”图片雾气
前端·javascript·css
前端Hardy17 小时前
HTML&CSS:好精致的导航栏
前端·javascript·css
前端老鹰18 小时前
HTML <output> 标签:原生表单结果展示容器,自动关联输入值
前端·html
墨渊君21 小时前
“蒙”出花样!用 CSS Mask 实现丝滑视觉魔法
前端·css
芦苇Z21 小时前
HTML <a> 标签的 rel 属性全解析:安全、隐私与 SEO 最佳实践
前端·html
小帆聊前端1 天前
Flex 布局实战指南:从踩坑到精通,解决 90% 布局难题
css
谢尔登1 天前
【CSS】层叠上下文和z-index
前端·css
Alice-YUE1 天前
【CSS学习笔记3】css特性
前端·css·笔记·html