Git undo local commit
久唔久就會大意地 Commit 錯野 發現以下這個 git command Git undo pushed commit and keep changes unstage 解決方法 git reset HEAD^
久唔久就會大意地 Commit 錯野 發現以下這個 git command Git undo pushed commit and keep changes unstage 解決方法 git reset HEAD^
久不久我使用的 Git 便會出現以下問題 Unlink of file. ’ file path and name’ failed. Should I try again? (y/n)
今日公司個 Production project 有一個 Bug 但係在 Staging 和 UAT environment 都 replicate 唔到呢個問題.. 之後便用Git Blame 去檢查一下有什麼 code change 再看看是那一個 commit 做了 code change 找到 commit 之後 便要嘗試去看看這個commit …
今日嘗試在 git 上加入之前 用 .gitignore Ignore 左既 個 project folder 入面的 .vscode資料夾 剛剛更新了 project 入面的 workspace setting 而在VS Code 的 workspace setting 是儲存在 .vscode/settings.json 上 要把這個檔案加回 …
解決方去 我們可以在 local 的 Git Repos 上設定這個 Repos 的Git Credential 我們只需要在 Git Bash上輸入以下指令便可以了 git config user.name "YOUR_USERNAME" git config user.email "YOUR_EMAIL" 如果大家不想每次都要輸入password 的話可 …
今日剛在Bitbucket 建立左一個新既 repos 當我嘗試 push local 的一個 git repos上去既時候出現了以下的錯誤信息 (當我嘗試 Pull 這個 repos 去 local 的 repos 時) “fatal: refusing to merge unrelated histories”
常常很大意地 merge完一些程式碼後沒有測試便Commit 和Pull 了到 Remote Repo 所以便要用 一些 git command 來還原之前的 Commit 再去解決問題 那麼如何 還原或 Checkout 之前的Commit 呢? 解決方法分簡單 我們只需要找到之前commit的 hash id 之後 “git checkout …