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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Git needs a new interface

32 点作者 r11t超过 15 年前

13 条评论

dlsspy超过 15 年前
&#62; You can’t merge upstream changes into your local, uncommitted modifications<p>No, you can't, and I'd be horrified if I ever worked in a system that did that again.<p>First, there's never an excuse to not commit. What you commit is not necessarily what you publish. rebase -i to clean up artifacts of the junk you've done if you're worried about it (I always do it that way).<p>But more importantly, when I pull code and what ends up is <i>worse</i> than what I had before, I'd like to go back to where I was.
评论 #862949 未加载
stevejohnson超过 15 年前
While I agree that git's error messages can be unhelpful, I still think that this guy is using git improperly when he tries to "merge upstream changes into your local, uncommitted modifications."<p>A huge motivation for using a DVCS is that you can commit as many times as you want without worrying that your in-progress, hacky changes will affect someone else's work. Combined with git's powerful branching, you should <i>never</i> have an excuse not to commit a change set before a merge.<p>Also, he whines about not being able to merge with uncommitted changes, and then gives an example of how to do it! Ridiculous. It's three intuitive commands. That's what stashing is for.<p>I do agree with his points about git reset. The args are very confusing. Reverting to the most recent commit should be more intuitive. However, these arguments do not in any way point toward a need for an entirely new interface.
评论 #863448 未加载
davepeck超过 15 年前
I often refer to Git as "software of cruelty." I use it daily and sometimes still end up shocked by its behavior.<p>The concepts underlying git -- a content-addressible filesystem, trees, commits, etc -- are elegant. They're nearly pure. The "front end" exposure on the command line? Not so much.
评论 #863001 未加载
jrockway超过 15 年前
This article had a lot of potential, but misses the key points.<p>What this article should say is:<p>1. Git needs a shared-library interface, so that interfaces to git can be built without quoting and parsing (the two most error-prone operations in computing).<p>2. Git's default scripts are a mix of shell, perl, and C that all parse command-line options in their own unique way. Eventually you find what works, but it's by random experimentation rather than by noticing patterns.<p>3. Git's default scripts are bloated. Quick, how many different ways are there to rebase ("git rebase", "git pull --rebase", ...) or fetch ("git fetch", "git remote update", ...)? Since the code is not necessarily shared, these operations may not even be exactly the same... just mostly the same.<p>Basically, git is the best version control system available -- but that doesn't mean it's not a software engineering nightmare. It is.<p>("So why don't you fix this?", you ask? Easy: git works so well that this theoretical annoyance is very low on my list of things to fix. In a perfect world, all software would be beautiful snowflakes. In the real world, there's always something that needs even more fixing.)
评论 #863662 未加载
ErrantX超过 15 年前
Without wanting to add fuel to the fire (really), I always think Git tries to do far too much. I think SCM should just gracefully version your code in as simple a way as possible.<p>I went from SVN to Git a while ago and it was a great improvement. Then a friend pointed me at mercurial and I just felt it was a revolution. Finally my code felt portable.<p>With all that said Git has some great tools for large and complex projects with many contributors.<p>The one thing that sells HG to me though is it's insistence on non-destructiveness. If you made changes to files it always reminds me to merge changes properly without overwrites. I cant recall how many times that has saved me a n hours work :)
评论 #863030 未加载
kinghajj超过 15 年前
1. "checkout" is a destructive command<p>Yeah, so? "checkout &#60;branch&#62;" changes the working dir's files to match those of &#60;branch&#62;, and "checkout &#60;file&#62;" reverts &#60;file&#62;'s contents to its original. It's documented and does what it says.<p>2. You can’t merge upstream changes into your local, uncommitted modifications<p>Why not just commit your "hacky" modifications onto a local branch? The great thing about Git is that your commits/checkins don't have to be perfect, since no-one else can see them until pushed/pulled/merged anyways.<p>3. Git’s merge conflict resolution workflow is unintuitive<p>If you've used Git at all, you should be comfortable with the fact that you need to "git add" files before you "git commit" them. Resolving changes is no different. "git add" each conflicting file and then "git commit".<p>4. Interface for working with the index almost universally confusing<p>Maybe you have a point there.<p>I'm actually using Git GUI a lot more than the command-line now. The only time I've used the command-line recently is for pruning, which the GUI has no way to do (it can only compress). Git GUI is pretty friendly.
评论 #865579 未加载
steveklabnik超过 15 年前
&#62; …will overwrite any local modifications you may have to foo.c without asking.<p>*NIX commands do things without asking. Your computer serves you, not the other way around. If I wanted my computer to double check everything that I do, I'd run Windows.<p>"(y/n/a)" just leads to awkward shell scripts.
评论 #862961 未加载
mjgoins超过 15 年前
The title is a wild exaggeration. The article itself points out many UI gripes that every user of git runs into. Fixing those gripes would absolutely not constitute the creation of a new UI.
senthilnayagam超过 15 年前
git porcelain is not ready for newbies, use tortoisegit or other gui interfaces.<p>I dont understand why people should have uncommitted changes for days<p>Branching is cheap and local, commits are local, no need to expose private work until it is ready to be merged with master, team accessible branches.
technomancy超过 15 年前
I use git every day via Magit (<a href="http://zagadka.vm.bytemark.co.uk/magit/" rel="nofollow">http://zagadka.vm.bytemark.co.uk/magit/</a>), which is a joy to use. But every time I have to fall back to the shell for something nontrivial it just feels so awkward.
etherael超过 15 年前
&#62; You can’t merge upstream changes into your local, uncommitted modifications<p>If you're just hacking around, shouldn't the procedure be to have a branch specifically for that and keep master clean for urgent work?<p>Confused.
评论 #863141 未加载
MarkPNeyer超过 15 年前
github.com is great for use with git. Disclaimer: I went to high school with (and am an arch rival of) the founder.
评论 #862826 未加载
superjared超过 15 年前
No it doesn't.
评论 #862831 未加载
评论 #862808 未加载