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

相关推荐
钱栈up14 小时前
前端改了三页、后端也动了,用户说「完全没变化」——我在 116 库上找到的三个真凶
css·数据库
燕落南枝19 小时前
CSS 字体样式:颜色、字体族、倾斜、加粗与装饰
前端·css
java1234_小锋1 天前
【技术专题】HTML5 网页技术 - Web Storage 本地存储 & 文件 API & 拖放 API
前端·html·html5
狮子座的男孩1 天前
html+css基础:24、2D变换(位移/缩放/旋转/扭曲(了解)/多重变换/变换原点)
前端·css·经验分享·html·2d位移·原点变换·缩放/旋转/扭曲
子兮曰1 天前
CSS 复现 23 种设计风格:从拟物到液态玻璃的成本阶梯与兜底写法【实战】
前端·css·视觉设计
java1234_小锋2 天前
【技术专题】HTML5 网页技术 - HTML5 SVG
前端·html·html5
燕落南枝2 天前
CSS 学习:类型选择器与 AI 注释实战
css·人工智能·学习
燕落南枝3 天前
CSS 类选择器详解:从入门到实战
前端·css
iCxhust3 天前
模型:500kW飞轮 10kV输电线路 油田抽油机 同时考虑无功补偿 统计:全年节电量 结果56万度电
前端·css·css3·电力·飞轮
燕落南枝3 天前
CSS 后代选择器与子代选择器:从入门到实战
前端·css