本地局域網(wǎng)共享git版本
可以通過(guò)ssh來(lái)訪問(wèn)同局域網(wǎng)
git clone ssh://username@hostname/~/PathToProject/.git
ps: Mac需要開啟遠(yuǎn)程登錄許可

remote login
ps: Mac 可以通過(guò)airdrop來(lái)直接傳輸所有應(yīng)用,包括項(xiàng)目。
傳輸項(xiàng)目是會(huì)應(yīng)用gitignore文件,這個(gè)不知道算好處還是壞處(實(shí)在有需要時(shí),可以用zip)。
git stash
之前公司有個(gè)帥哥經(jīng)常問(wèn)我有沒(méi)有聽說(shuō)過(guò)git stash,一直不屑一顧,其實(shí)對(duì)效率挺有幫助的的。
// 假設(shè)有一天你在buging。
// 寫到一半產(chǎn)品忽然來(lái)找你提一個(gè)緊急小pr,你代碼沒(méi)寫完不想commit
// 這時(shí)你可以
git stash && git checkout master
// 做完需求之后可以
git checkout the_branch && git stash pop
簡(jiǎn)單對(duì)比
git status
// 縱覽修改,變更情況
git diff origin/master --raw
git diff origin/master test.py
查詢r(jià)evert前的commit
git log // 木有
git reflog // 可以查到記錄和id
修改gitignore
git rm -r --cached .
git add .
git commit -m 'words'