1. 搜索git進(jìn)入官網(wǎng):https://git-scm.com/
2. 下載git(如果需要的話可以安裝GUI圖形界面的)
3. 安裝后在Terminal里面試一下git命令有沒(méi)有反應(yīng),結(jié)果出現(xiàn)問(wèn)題,報(bào)錯(cuò):xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
解決方案:
Terminal中手動(dòng)輸入 xcode-select --install
4. 參考http://www.runoob.com/w3cnote/git-guide.html,在建立本地
庫(kù)的時(shí)候出現(xiàn)了問(wèn)題,即無(wú)法git bash here操作,解決問(wèn)題如下。
5. 右鍵->菜單->git bash here?
在mac上無(wú)法實(shí)現(xiàn),實(shí)現(xiàn)方法見(jiàn)油管上的這個(gè)視頻:
https://www.youtube.com/watch?v=7BSEGuFov-Y
簡(jiǎn)單總結(jié)一下:搜索(spotlight search) -> keyboard -> shortcuts(快捷鍵) -> services -> files and folders ->new terminal at folder
這樣在Mac上對(duì)文件夾的git bash here 就其實(shí)可以用右鍵->服務(wù)->New Terminal at folder(打開(kāi)Terminal)-> 在Terminal輸入對(duì)應(yīng)的git bash 里面的命令就行了