顯示具有 git 標籤的文章。 顯示所有文章
顯示具有 git 標籤的文章。 顯示所有文章

2012年10月9日 星期二

利用 RabbitVCS clone/update bitbucket 上的 git 專案


如果直接用 bitbucket 提供的
https://[username]@bitbucket.org/XXXX/XXXX.git
會顯示 Could not read Password for XXXX 的訊息
要將 url 改成
https://[username]:[password]@bitbucket.org/XXXX/XXXX.git
才行
如果是已經 clone 出來的 project, 則修改 .git/config 裡的 url 內容即可

git 設定

使用 git config --system 的設定值會存在 /etc/gitconfig 裡
使用 git config --global 的設定值會存在 ~/.gitconfig 裡
每個 repository 裡的 .git/config 則會覆蓋上述二個檔案的設定,提供個別 repository 專門的設定

將預設編輯器改為 vim
git config --global core.editor vim
改使用者名稱
git config --global user.name "Your Name"
改使用者 e-mail 位址
git config --global user.email you@example.com
設定使用的 diff tool
git config --global merge.tool vimdiff
查看目前設定
git config --lis