前言
Git 學習筆記, 學什麼記什麼!
Q&A
如何在新建的檔案中,
git add部分的程式碼?git add -N new_file
git add -iGit 中, 如何指定 git 指令作用的目錄? 比方說, 我目前的目錄不是
~/code/project, 但我想要git commit作用的範圍在~/code/project?git -C `~/code/project` commit -m 'whatever'`Git 中, 如何取得當前 branch 最新的 commit 的 message?
git log --oneline --format=%B -n 1 | cat- %B: 輸出 subject + 主體
- %s: subject
- %b: 主體
- -n: 只顯示最新的幾筆 commit, 後面接數字, 也可使用
-(n)方式
留言