- 從 branch merge 回 master, 導致 pom.xml conflict, 想 reset pom.xml 因為這不是我要 merge 的內容. (stackoverflow)
git reset pom.xml git checkout pom.xml
- 想清掉 untrack file
git clean -f
- 想清掉 untrack folder
git clean -f -d
- 有次一個 branch 太久沒 pull 了, 後來不知道誰改了甚麼, 要再 pull 都 conflict 一堆.
反正我也沒有要保留 local 的東西, 同事就教我強制把 local 的檔案 reset 到某個版本git reset comm_id --hard
- 在 pull 之前就 commit, git status 出現 "Your branch is ahead of 'origin/master' by 25 commits" 的訊息, 用 reset 還原
git reset --hard origin/master
- 要把一個 branch 傳送到另一個 repository
# new remote git remote add remotename git@git.abc.com:test/test.git # push branch to remote git push -u remotename branchname
Git 筆記
訂閱:
張貼留言 (Atom)
別名演算法 Alias Method
題目 每個伺服器支援不同的 TPM (transaction per minute) 當 request 來的時候, 系統需要馬上根據 TPM 的能力隨機找到一個適合的 server. 雖然稱為 "隨機", 但還是需要有 TPM 作為權重. 解法 別名演算法...
-
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的 開啟的話, OpenSessionInViewInterceptor 就會介入 收到 web request 的時候...
-
Introduction One day, Cassandra stop listening for thrift client until restart it manually. After checking Cassandra log, found it enco...
-
第一次錄影片分享技術議題. Source code: https://github.com/axxdeveloper/study-practice/tree/gpb 主要其實就是之後可以用 Any.pack( gpbEntity ).toByteArray 傳送出去. 接收端也...
沒有留言:
張貼留言