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

相关推荐
EchoEcho2 小时前
记录overflow:hidden和scrollIntoView导致的页面问题
前端·css
im_AMBER3 小时前
告别“玄学”UI:从“删代码碰运气”到“控制 BFC 结界”
前端·css
bjzhang753 小时前
使用 HTML + JavaScript 实现文件树
javascript·html·文件树
芳草萋萋鹦鹉洲哦3 小时前
【Tailwind】动画解读:Tailwind CSS Animation Examples
前端·css
Smart-Space4 小时前
htmlbuilder - rust灵活构建html
rust·html
Mr Xu_19 小时前
前端开发中CSS代码的优化与复用:从公共样式提取到CSS变量的最佳实践
前端·css
anOnion20 小时前
构建无障碍组件之Alert Dialog Pattern
前端·html·交互设计
Lee川21 小时前
CSS盒模型实战:用代码透视 `border-box`与 `content-box`的天壤之别
css
一个懒人懒人1 天前
Promise async/await与fetch的概念
前端·javascript·html