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

相关推荐
芜青10 小时前
实现文字在块元素中水平/垂直居中详解
前端·css·css3
前端Hardy11 小时前
HTML&CSS&JS:超酷炫的一键登录页面
前端·javascript·css
vaelcy12 小时前
css3实现登录框动画特效效果
前端·css
前端老鹰14 小时前
CSS counter-reset 与 counter-increment:用 CSS 实现自动编号的黑科技
前端·css·html
Ice_Sugar_715 小时前
CSS:BFC
前端·css
碎像16 小时前
uni-app实战教程 从0到1开发 画图软件 (学会画图)
前端·javascript·css·程序人生·uni-app
枫叶是圆的18 小时前
纯CSS+JS制作抽奖大转盘
前端·javascript·css·html·css3
Darling02zjh18 小时前
_CSS3
前端·css·css3
har01d18 小时前
【CSS3】录音中。。。
前端·css·vue.js·vue·vue3·css3
遂心_18 小时前
用 Tailwind CSS + React 打造精美商品卡片组件
前端·javascript·css