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

相关推荐
佘小麦6 分钟前
【HTML元素居中】元素水平垂直居中的常用方法
css·html·css3
过期的H2O229 分钟前
【H2O2|全栈】关于CSS(4)CSS基础(四)
前端·css
白云~️3 小时前
监听html元素是否被删除,删除之后重新生成被删除的元素
前端·javascript·html
Yxmeimei3 小时前
css实现居中的方法
前端·css·html
6230_3 小时前
git使用“保姆级”教程2——初始化及工作机制解释
开发语言·前端·笔记·git·html·学习方法·改行学it
GISer_Jing4 小时前
前端CSS学习框架
css·css3
Q186000000004 小时前
在HTML中添加视频
前端·html·音视频
Easonmax5 小时前
【HTML5】html5开篇基础(1)
前端·html·html5
忘不了情6 小时前
左键选择v-html绑定的文本内容,松开鼠标后出现复制弹窗
前端·javascript·html
世界尽头与你6 小时前
HTML常见语法设计
前端·html