对於其他人没什麽用的我的 git cheatsheet。
感觉还是要有情境呢..
git log --oneline -g
blame
blame -L 5,10
checkout .
checkout <file>
从 staging area 拿回档案,如果 <file>
不曾被 track 会 error
checkout <file> HEAD^^
checkout --ours <file>
checkout --theirs <file>
reset
[[git reset]]
--soft resets the head to commit
--mixed 预设。resets the index. 所以 working tree 没被动到。
--hard resets the index and working tree.
git reset e12d8ef^^
^代表回去几次
相等於 git reset e12d8ef~2
git reflog
git log -g
可以看到 head 被移动的纪录。
detached HEAD
git diff
working tree and index
git diff --cached HEAD
index 和 head
【状况题】手边的工作做到一半,临时要切换到别的任务
stash list
stash apply stash@{0}
stash drop stash@{0}
stash pop stash@{0}
Pull 下载更新
pull = fetch + merge
Pull 指令其实就是去上线抓东西下来(Fetch),并且更新本机的进度(Merge)而已。
【状况题】怎麽有时候推不上去…
pull --rebase
【状况题】怎麽跟上当初 fork 专案的进度?
remote -v
verbose
remote add <upstreamname> <giturl>
<<: EP 25: Validation by Data Annotation Validators in TopStore App
#!/bin/bash set -eu function main() { echo -e "/ke...
设计大纲 一个平台要成功,当然少不了图片/照片的介绍(很爱看图的懒人XD),所以接下来要设计一个区块...
HI 各位大大 请问我目前有几张表单卡着进不去TT,重启服务後於EF 主程序看到的这个错误讯息,想请...
前言 Hi我是鱼板伯爵,本次教学会用一个简单的加一减一的范例来教大家 Bloc 这个套件,当你学会以...
event 查目前网页的 event,开启 Chrome 的开发者工具,点选 Elements,之後...