一个用Git交互可视化教学的项目

栏目: 编程工具 · 发布时间: 7年前

内容简介:Learn git branching 这个是Git 的可视化教学项目 是能够让新手快速上手Git的教程这两天花时间把 Learn Git Branching Main部分的做了一遍。 对理解git分支的使用很有帮助,另外发现git的帮助文档和github的帮助文档都很详细,应该好好读一遍。答案记录在下面

Learn git branching 这个是Git 的可视化教学项目 是能够让新手快速上手Git的教程

一个用Git交互可视化教学的项目

这两天花时间把 Learn Git Branching Main部分的做了一遍。 对理解git分支的使用很有帮助,另外发现git的帮助文档和github的帮助文档都很详细,应该好好读一遍。

使用命令查看 答案
$ show solution
复制代码

答案记录在下面

1.1 Introduction to Git Commits

git commit
git commit
复制代码

1.2 Branching in Git

git branch bugFix
git checkout bugFix
复制代码

1.3 Merging in Git

git checkout -b bugFix
git commit
git checkout master
git commit
git merge bugFix
复制代码

1.4 Rebase Introduction

git checkout -b bugFix
git commit
git checkout master
git commit
git checkout bugFix
git rebase master
复制代码

2.1 Detach yo’ HEAD

git checkout C4
复制代码

2.2 Relative refs (^)

git checkout C4^
复制代码

2.3 Relative refs #2 (~)

git branch -f master C6
git branch -f bugFix C0
git checkout C1
复制代码

2.4 Reversing Changes in Git

git reset local~1
git checkout pushed
git revert pushed
复制代码

3.1 Cherry-pick Intro

git cherry-pick C3 C4 C7
复制代码

3.2 Interactive Rebase Intro

git rebase -i master~4 --aboveAll
复制代码

4.1 Grabbing Just 1 Commit

git checkout master
git cherry-pick C4
复制代码

4.2 Juggling Commits

git rebase -i caption~2 --aboveAll
git commit --amend
git rebase -i caption~2 --aboveAll
git branch -f master caption
复制代码

4.3 Juggling Commits #2

git checkout master
git cherry-pick C2
git commit --amend
git cherry-pick C3
复制代码

4.4 Git Tags

git tag v0 C1
git tag v1 C2
git checkout C2
复制代码

4.5 Git Describe

git commit
复制代码

5.1 Rebasing over 9000 times

git rebase master bugFix
git rebase bugFix side
git rebase side another
git rebase another master
复制代码

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Learn Python the Hard Way

Learn Python the Hard Way

Zed A. Shaw / Addison-Wesley Professional / 2013-10-11 / USD 39.99

Master Python and become a programmer-even if you never thought you could! This breakthrough book and CD can help practically anyone get started in programming. It's called "The Hard Way," but it's re......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具