git
1 人追踪
4 篇文章
Phanix

SSL Cert error of git operations via https

對 remote git repository 存取,可以透過 ssh 或 https,有時候用 https 的時候會遇到 Error 原因 如果是透過 https 來對 remote repository 做操作,例如 git clone https://git.domain...

Phanix

[GIT] Delete wrong merge, then redo

做 merge 的時候難免手殘… 如果還沒 push 到 server 上,那可以用 git reset –hard HEAD~1 來復原。如果是用 –soft 的話該 merge commit 依然會存在 local repository中,不像用 –hard 會刪除。

Phanix

Rollback a commit on remote git repository

因為有同事幹了蠢事,所以紀錄一下順便寫一下差異 第一種方式是先 git reset 然後做 force push, 例如; ~/testGit/gittest$ git reset --hard 36b6b053ff9980ce7934f9f9c4a5a849ca7fcc7a ...

Phanix

[GIT] 將特定branch同步成特定commit

最常用到的狀況大概就是在新開的 branch 上做了很久,但是自以為是在 master 上,時間久了要 merge 卻是個眼花撩亂,只好直接拿這 branch 蓋掉 master。最糟糕的方式就是把所有 branch 都 fetch 下來且 track,把 branch的所有檔案...

没有更多