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

相关推荐
AZaLEan__5 小时前
Flex 弹性布局学习总结
前端·css·css3
大家的林语冰7 小时前
TS 登顶第一语言;JS 最新 Temporal 时间减屎;Node 爆发反 AI 运动;CSS 将支持图片亮暗切换《前端周刊》
前端·javascript·css
爱上好庆祝9 小时前
学习js的第四天
前端·css·学习·html·css3·js
龙猫里的小梅啊12 小时前
CSS(五)CSS盒模型
前端·css·html
玖疯子13 小时前
HTML头部元信息避坑指南技术文章大纲
前端·html
深念Y13 小时前
AI时代办公格式的演进:PPT与Word的替代已现,Excel将走向何方?
数据库·人工智能·html·word·powerpoint·excel·markdown
ZC跨境爬虫13 小时前
Apple官网复刻第二阶段day_3:(还原苹果官网iPhone顶部标准文案区块,一次编写全局复用)
前端·css·ui·html·iphone
Momo__13 小时前
CSS :has() 选择器:让父元素"看见"子元素的状态
前端·css
Dxy123931021614 小时前
HTML 如何设置 Div 阴影悬浮边框:从基础到进阶
前端·html·css3
ZC跨境爬虫14 小时前
Apple官网复刻第二阶段day_2:(前端模块化还原苹果官网WATCH海报)
前端·ui·重构·html·状态模式