TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Visualized Git practices for team: branch, merge, rebase

86 点作者 kentnguyen超过 13 年前

9 条评论

martco超过 13 年前
I agree with the author that learning and becoming handy with git cli is very important.<p>I don't agree that you should stop using a GUI for git, especially if you've already cut your teeth on the command line. Tower, a git GUI for Mac OS X, has a great interface and ties in very well with the core git functionality. I've learned a lot about stashing, merge conflict resolution, and cherry-picking, thanks to that app. Also, Tower shows a tree graph, similar to the network diagram the author "seriously cannot live without."<p>Why knock visual tools when when you rely on them so much?
评论 #3522805 未加载
评论 #3522722 未加载
spitfire超过 13 年前
Isn't it a little ambitious to call yourself a veteran $foo programmer when you've been doing it for a little over a year?<p>Particularly when the blog post before this is discussing how .m and .h files totally confused you. God help him if he gets asked a linked list question in an interview.
评论 #3523365 未加载
gavingmiller超过 13 年前
The OP gives his own definition for rebase: git rebasing is taking all your local changes since the last push and put them ahead of other people’s changes regardless of the date you made the commit.<p>But fails to explain _why_ you'd want to do that. Can anyone fill in that why for me?
评论 #3522711 未加载
评论 #3522701 未加载
评论 #3522899 未加载
评论 #3524133 未加载
igorgue超过 13 年前
I think the best thing I did for my team is explain them how branches work, and how not-so-special are they, branches are just pointers to a commit, and commits are never 'lost'.<p>People need to understand how simple Git is.
dqminh超过 13 年前
Its opposite for us. At work, we dont use branch, only git pull --rebase on master. Any idea on when and why to use branches often ?
评论 #3522237 未加载
评论 #3522582 未加载
评论 #3522628 未加载
评论 #3523394 未加载
SeoxyS超过 13 年前
Can somebody explain how rebasing affects shared histories. Say I'm rebasing a feature branch that's shared via github, will rewriting the commit history prevent me from pushing?<p>I avoid `git commit --amend` because of that, and thought that `rebase` had the same problem. So for that reason, I always use `merge`. Am I mistaken?
评论 #3523210 未加载
hack_edu超过 13 年前
I love git. It helps me to wake up in the morning some days. But...<p>The OP's attempt to visualize git concepts falls quite short. This same old branching graph does little to nothing to illustrate these concepts. I cannot tell you how many friends and colleagues threw up their hands when someone tries to graph it out these way.
nazri1超过 13 年前
The merge-often strategy that the OP recommend in his post is the one that is Linus abhors so much. He even calls it "unholy mess" : <a href="https://lkml.org/lkml/2012/1/10/267" rel="nofollow">https://lkml.org/lkml/2012/1/10/267</a>. Basically that merge strategy can produce pointless merges.<p>See this discussion: <a href="http://git.661346.n2.nabble.com/Re-Regulator-updates-for-3-3-td7174179.html" rel="nofollow">http://git.661346.n2.nabble.com/Re-Regulator-updates-for-3-3...</a> on the git developer mailing list for more details on why that merging strategy is not liked.
评论 #3524126 未加载
lucisferre超过 13 年前
His opinions on not rebasing onto master and instead merging are his own. Personally I find merging far more confusing in terms of understanding history graphs and always rebase before issuing a pull request. I think you will find that generally a lot of open source projects on Github have this practice of asking people to "please rebase your changes onto master so I can merge".<p>One practical reason is when doing bisects.<p>There are certainly two schools of thought on this, but "this is confusing to me so don't do it" shouldn't be considered a valid opinion.