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

相关推荐
wsWmsw1 小时前
[译] 浏览器里的 Liquid Glass:利用 CSS 和 SVG 实现折射
前端·css·svg
银安1 小时前
CSS排版布局篇(2):文档流(Normal Flow)
前端·css
折翼的恶魔3 小时前
前端学习之样式设计
前端·css·学习
街尾杂货店&5 小时前
css word-spacing属性
前端·css
无尽夏_12 小时前
HTML5(前端基础)
前端·html·html5
angleoldhen15 小时前
网页版的点名/抽奖程序
html·抽奖·点名
Never_Satisfied16 小时前
在JavaScript / HTML中,调整div的边框
html·边框
Never_Satisfied18 小时前
在JavaScript / HTML中,line-height是一个CSS属性
javascript·css·html
前端Hardy21 小时前
HTML&CSS&JS:纯前端图片打码神器:自定义强度 + 区域缩放,无需安装
前端·javascript·css
这可不简单21 小时前
前端性能优化:从浏览器渲染原理到实战(告别 “知其然不知其所以然”)
前端·css·面试