[個人筆記] git指令雜項備註

  • 151
  • 0
  • 2020-01-31

純屬個人常常遇到的筆記

repository ignore檔似乎沒生效

git rm -r --cached .   (這個逗號跟空格也是必要呢)
git add .

上面的指令似乎是先刪掉全部 再重新加回去

其實也可以手動刪除 指定的檔案。再還原disacard

應該也有同樣效果

 

透過帳密密碼直接clone專案

git clone http://帳號:密碼@gitlab.com/team_name/using.git
git clone https://帳號:密碼@gitlab.com/team_name/using.git

 

Linux相關

記住密碼
$ git config --global credential.helper cache


首次clone 會要求輸入帳號密碼