--- title: git操作 tags: github, git categories: github, git --- # Git操作 git操作 git status git clone `github URL` (從github上抓下來,到當前目錄) <!-- git clone 'https://github.com/andy870622/EEG-Reader' (從網路上抓下來,到當前目錄) --> ————push流程————- git add . (全部加) git commit -m “註解” git push git push -f #硬推 ————————————— git pull (把檔案抓下來) 每次修改過都要push上去pull下來 Git log 看commit狀況 Git checkout Git branch 分支名字 #新增分支 Git branch :查看分支 Git checkout 分支名字:切換分支 如何移除掉已經被 git 追蹤的檔案 可以使用 git rm -f 來移除掉特定的檔案類型 例如:git rm -f *.DS_Store 如果要移除 repository 內所有的 .DS_Store 檔案 find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch 如果一开始的时候忘记配置了忽略文件的话,也不要怕,通过以下方法来做更改: git rm -r --cached .DS_Store  Pwd 路徑 Terminal i :可輸入 Esc:退出 再輸入 :wq 離開 Reference 學長 https://slides.com/jimting/git/#/ * git 相關面試題 https://gitbook.tw/interview
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up