跪求不要 git push -f - 简书



跪求不要 git push -f - 简书

看到一则新闻,美国某程序员枪击同事案件,很多网友猜测出了各种激怒码农同事的办法

9月19日,一名程序员在美国某办公楼向4名同事开枪,导致一人情况危机,两人伤情严重,一人被子弹擦伤。目前,凶手已死,身份被警方查明。
目前,码农持枪杀人的动机仍然是个谜。有人猜测道:"同事不写注释,不遵循驼峰命名,括号换行,最主要还天天 git push -f 等因素" 激怒了这名行凶者。

正常的流程是要在自己的本地解决掉所有的 merge conflict 之后才能 push 到 remote 的。鲁莽的 push -f 确实很容易激怒别人,同时也会很大风险把别人有价值的 commit 都覆盖清空了。

push -f 自然是能不用就不用,但也有一种清空是整个team决定要清一些 commit 把 master 分支回退到某个点上去,自然就想到了 push -f 会是一种非常便捷的做法了。那能不能更优雅的去实现我们的回退操作呢,因为最佳实践原则上 git 历史记录不应该被覆盖的。


Read full article from 跪求不要 git push -f - 简书


No comments:

Post a Comment

Labels

Algorithm (219) Lucene (130) LeetCode (97) Database (36) Data Structure (33) text mining (28) Solr (27) java (27) Mathematical Algorithm (26) Difficult Algorithm (25) Logic Thinking (23) Puzzles (23) Bit Algorithms (22) Math (21) List (20) Dynamic Programming (19) Linux (19) Tree (18) Machine Learning (15) EPI (11) Queue (11) Smart Algorithm (11) Operating System (9) Java Basic (8) Recursive Algorithm (8) Stack (8) Eclipse (7) Scala (7) Tika (7) J2EE (6) Monitoring (6) Trie (6) Concurrency (5) Geometry Algorithm (5) Greedy Algorithm (5) Mahout (5) MySQL (5) xpost (5) C (4) Interview (4) Vi (4) regular expression (4) to-do (4) C++ (3) Chrome (3) Divide and Conquer (3) Graph Algorithm (3) Permutation (3) Powershell (3) Random (3) Segment Tree (3) UIMA (3) Union-Find (3) Video (3) Virtualization (3) Windows (3) XML (3) Advanced Data Structure (2) Android (2) Bash (2) Classic Algorithm (2) Debugging (2) Design Pattern (2) Google (2) Hadoop (2) Java Collections (2) Markov Chains (2) Probabilities (2) Shell (2) Site (2) Web Development (2) Workplace (2) angularjs (2) .Net (1) Amazon Interview (1) Android Studio (1) Array (1) Boilerpipe (1) Book Notes (1) ChromeOS (1) Chromebook (1) Codility (1) Desgin (1) Design (1) Divide and Conqure (1) GAE (1) Google Interview (1) Great Stuff (1) Hash (1) High Tech Companies (1) Improving (1) LifeTips (1) Maven (1) Network (1) Performance (1) Programming (1) Resources (1) Sampling (1) Sed (1) Smart Thinking (1) Sort (1) Spark (1) Stanford NLP (1) System Design (1) Trove (1) VIP (1) tools (1)

Popular Posts