Git 学习
网址:https://learngitbranching.js.org/
你对 Git 感兴趣吗?那么算是来对地方了! “Learning Git Branching” 可以说是目前为止最好的教程了,在沙盒里你能执行相应的命令,还能看到每个命令的执行情况; 通过一系列刺激的关卡挑战,逐步深入的学习 Git 的强大功能,在这个过程中你可能还会发现一些有意思的事情。
01-Git Commit
笔记:
git commit 【提交记录】
通关代码:
$ git commit
$ git commit
02-Git Branch
笔记:
Git Branch <you name>【新建分支】
git checkout <you name>;git commit【切换到分支上;提交修改】
git switch会取代checkout
03-Git Merge
笔记:
git merge <you name>【两个不同的节点合并成一个,没有记录】
git checkout bugFix;git merge main【切换到分支后;将main合并到bugFix】
objective[提示]
通关代码:
$ git branch bugFix
$ git checkout bugFix
$ git commit
$ git checkout main
$ git commit
$ git merge bugFix
04-Git Rebase
笔记:
git rebase <you name>【将当前分支合并到 <you name>上,当前分支变成透明节点。】
通关代码:
$ git branch bugFix
$ git checkout bugFix
$ git commit
$ git checkout main
$ git commit
$ git checkout bugFix
$ git rebase main
遇到问题了
光标无法显示,不能输入命令。[尝试刷新浏览器了]
应该是缓存的问题,用其他浏览器或者无痕模式就可以了。
评论