今日公司個 Production project 有一個 Bug 但係在 Staging 和 UAT environment 都 replicate 唔到呢個問題.. 之後便用Git Blame 去檢查一下有什麼 code change 再看看是那一個 commit 做了 code change 找到 commit 之後 便要嘗試去看看這個commit merge 了去那些 branch 解決方法
2019-02-10
解決方去 我們可以在 local 的 Git Repos 上設定這個 Repos 的Git Credential 我們只需要在 Git Bash上輸入以下指令便可以了 git config user.name "YOUR_USERNAME" git config user.email "YOUR_EMAIL" 如果大家不想每次都要輸入password 的話可以輸入以下Git command 去 cache 你的 git password git config credential.helper cache Hope you find it useful
2017-12-15
今日剛在Bitbucket 建立左一個新既 repos 當我嘗試 push local 的一個 git repos上去既時候出現了以下的錯誤信息 (當我嘗試 Pull 這個 repos 去 local 的 repos 時) “fatal: refusing to merge unrelated histories”
2017-12-12
常常很大意地 merge完一些程式碼後沒有測試便Commit 和Pull 了到 Remote Repo 所以便要用 一些 git command 來還原之前的 Commit 再去解決問題 那麼如何 還原或 Checkout 之前的Commit 呢? 解決方法分簡單 我們只需要找到之前commit的 hash id 之後 “git checkout [commit hash]” 便可以了 查看之前的Commit 可以使用 “git log [-(前多小個 commit)]” e.g.
2017-06-19