Git 筆記 note

找戰犯指令,看是誰改了某個檔案 (可指定行數)
git blame -L 5,10 index.html

git我想用加入某個branch中某個commit,要怎麼做
git cherry-pick  問完就想到keyword了w


git commit message的寫法,可以參考OBS, x264
OBS有說明格式


git push origin test:master

https://git-scm.com/docs/git-rebase


看ref
git reflog
git show-ref


git rm -cached  只從git內砍掉,保留檔案
--cached

    Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.


更新submodule,如果不下--remote,會用本地的sha checkout
git submodule update --init --recursive --remote


tag只是pointer to hash類似branch的概念,但不一定要在branch上

這樣可以只推tag出去
git tag -a tagname -m 'tagmessage' commithash
git push --tags


git rebase
-root 可以從branch最初的紀錄開始w

使用者資訊
For just one repo:

git config user.name "Your Name Here"
git config user.email your@email.com

For (global) default email (which is configured in your ~/.gitconfig):

git config --global user.name "Your Name Here"
git config --global user.email your@email.com


OBS Update Contributors list



https://github.com/obsproject/obs-studio/pull/1607





https://speakerdeck.com/mouson/20190323-threegittips-tai-ri-ji-shu-she-qun-jiao-liu-hui
 

留言

這個網誌中的熱門文章

OBS 抓不到畫面, 視窗, 遊戲擷取, 黑或白畫面, 當掉 ,卡住, black/white screen, window game capture, crash, freeze

優化實況(一) OBS設定 streaming settings

OBS plugin obs-text 顯示播放中音樂, display playing music