Things I hate about Git (2012)(stevebennett.me)
stevebennett.me
Things I hate about Git (2012)
https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/
82 comments
One resource I've found pretty useful for understanding git is http://think-like-a-git.net/ (also linked at the end of the article). It basically describes git in terms of a directed acyclic graph, where branches/tags give you starting points into the underlying DAG, and the various commands allow you to perform manipulations on it. Once I started thinking about it this way, it made a lot more sense.
That said, the command line UI really is infuriating - checkout means 3 different things depending on what the argument is, it's never clear to me whether I should be using "origin master" or "origin/master," etc. I'm also not entirely sold on the usefulness of the index, but perhaps that's cause I'm still new to using git.
That said, the command line UI really is infuriating - checkout means 3 different things depending on what the argument is, it's never clear to me whether I should be using "origin master" or "origin/master," etc. I'm also not entirely sold on the usefulness of the index, but perhaps that's cause I'm still new to using git.
> You can't just "commit" as in subversion, you must understand what are you doing.
Further I'd argue the subversion "just commit" model is potentially toxic to the quality of the codebase and SCM logs. It makes the act of sharing code with others overly casual. Users therefore often don't become proficient in the proper use of SCMs in general. They write poor commit messages, or may not have a clear understanding of changes introduced by their commit (this goes double for IDE-integrated SCM plugins that I've generally found to have poor UI and lack good affordances for grokking what's happening at any point).
The stage -> commit -> push (often to feature branch) provides multiple checkpoints to find issues in your code before it makes it into master/trunk. While staging (especially if you're using a GUI) you have a chance to view the changes being staged. After committing and before pushing, if you find something else that you missed, you can quickly amend your commit without much harm done. The pull request mechanism added by Github provides an additional code review step for a final sanity check and also allows you to run tests on branches before allowing merges (contrasted with the common practice of allowing everyone trunk privileges in SVN, often with a post-commit code review). Rebasing is a an act of final resort for cleaning up your work before everyone else is burdened with the job of grokking and maintaining it for the remaining lifetime of the system.
EDIT: Some of these practices are possible to replicate in SVN (eg. do an svn diff and really review the changes before committing) but there's no chance of amending commits, private or features branches are less frequently adopted and rebasing is equivalent to FTL travel and immortality from an SVN viewpoint.
Further I'd argue the subversion "just commit" model is potentially toxic to the quality of the codebase and SCM logs. It makes the act of sharing code with others overly casual. Users therefore often don't become proficient in the proper use of SCMs in general. They write poor commit messages, or may not have a clear understanding of changes introduced by their commit (this goes double for IDE-integrated SCM plugins that I've generally found to have poor UI and lack good affordances for grokking what's happening at any point).
The stage -> commit -> push (often to feature branch) provides multiple checkpoints to find issues in your code before it makes it into master/trunk. While staging (especially if you're using a GUI) you have a chance to view the changes being staged. After committing and before pushing, if you find something else that you missed, you can quickly amend your commit without much harm done. The pull request mechanism added by Github provides an additional code review step for a final sanity check and also allows you to run tests on branches before allowing merges (contrasted with the common practice of allowing everyone trunk privileges in SVN, often with a post-commit code review). Rebasing is a an act of final resort for cleaning up your work before everyone else is burdened with the job of grokking and maintaining it for the remaining lifetime of the system.
EDIT: Some of these practices are possible to replicate in SVN (eg. do an svn diff and really review the changes before committing) but there's no chance of amending commits, private or features branches are less frequently adopted and rebasing is equivalent to FTL travel and immortality from an SVN viewpoint.
One source that really helped me learn advanced git are the extended manual pages here:
https://git-man-page-generator.lokaltog.net/
It describes advanced features like `git-govern-origin` and `git-organize-head` [0].
[0]. https://git-man-page-generator.lokaltog.net/#26463b871524ca4...
https://git-man-page-generator.lokaltog.net/
It describes advanced features like `git-govern-origin` and `git-organize-head` [0].
[0]. https://git-man-page-generator.lokaltog.net/#26463b871524ca4...
Any recommendations for resources on workflows for GIT?
I mostly write ML code as a single author and there's a lot of experimenting going on, so often I sit at the end of the day and write a commit message along the lines of "dicking around" or "updated some files" and feel like I might as well just sync my stuff with Dropbox and not have to worry about all the GIT commands.
I mostly write ML code as a single author and there's a lot of experimenting going on, so often I sit at the end of the day and write a commit message along the lines of "dicking around" or "updated some files" and feel like I might as well just sync my stuff with Dropbox and not have to worry about all the GIT commands.
This is possible the best overview of a number of tried and tested workflows: https://about.gitlab.com/2014/09/29/gitlab-flow/
They're naturally recommending the GitLab Flow, but a good approach is to read through it and choose what might work for you. The important thing is to keep in mind that there are countless variables that will likely be different for each team -- team size, release schedule, build process, testing etc -- which mean that each team's flow will be somewhat specific.
And as for commit messages, I have developed a system which helps me write more meaningful messages with just a little bit of discipline: instead of summarising what I did, I try to figure how would I give instructions to someone to do the same. So I have things like "refactor MyBigFunction to individual methods" or "change SomeSetting to use float instead of int" or "implement NewClass".
They're naturally recommending the GitLab Flow, but a good approach is to read through it and choose what might work for you. The important thing is to keep in mind that there are countless variables that will likely be different for each team -- team size, release schedule, build process, testing etc -- which mean that each team's flow will be somewhat specific.
And as for commit messages, I have developed a system which helps me write more meaningful messages with just a little bit of discipline: instead of summarising what I did, I try to figure how would I give instructions to someone to do the same. So I have things like "refactor MyBigFunction to individual methods" or "change SomeSetting to use float instead of int" or "implement NewClass".
git-flow[1] is implementation of a flow with better UX. You can fork it and modify to fit your needs.
[1] https://github.com/petervanderdoes/gitflow-avh
[1] https://github.com/petervanderdoes/gitflow-avh
Author here. Yeah, the lack of authorship (and any kind of user awareness, really) is a pain.
There are so many ways in which Git has simply failed. It was basically an experimental piece of software designed for a hypothetical world which never really eventuated. Truly distributed version control (code shared between different servers) turned out to be a fringe use case, and the vast majority of all collaborative developed source code has a primary repository. So it has all these features built around the edge case, and a lack of features for the primary case (many users, with different levels of trust, contributing to one repo).
Gitless is pretty cool. http://gitless.com/
There are so many ways in which Git has simply failed. It was basically an experimental piece of software designed for a hypothetical world which never really eventuated. Truly distributed version control (code shared between different servers) turned out to be a fringe use case, and the vast majority of all collaborative developed source code has a primary repository. So it has all these features built around the edge case, and a lack of features for the primary case (many users, with different levels of trust, contributing to one repo).
Gitless is pretty cool. http://gitless.com/
"it's complicated": yes,it is. it's a product designed and built for people who deal with complex systems and information models on a daily basis; they're the equivalent of a professional pilot... not your feeble, senile grandmother. You wouldn't buy your feeble senile grandmother a 787, chuck her in with no training and simple expect her to fly to Bali, would you?
"I don't like it and here's a heap of examples which lead me to arrive at my preordained conclusion that it's completely broken": cool, you've found issues. If you can, fix them and share. If you can't or won't... well, there are other tools for doing version control and perhaps another might suit you better. If you have to work with people that use git, I'm sure there's some way you can generate patch sets and still get stuff done.
"I don't like it and here's a heap of examples which lead me to arrive at my preordained conclusion that it's completely broken": cool, you've found issues. If you can, fix them and share. If you can't or won't... well, there are other tools for doing version control and perhaps another might suit you better. If you have to work with people that use git, I'm sure there's some way you can generate patch sets and still get stuff done.
The difference is that to fly 787s you need quick response and muscle memory so all controls have to be available, and you've got to be able to fix errors in-flight.
And even then you don't want to create a joystick which pulls up when pushing forward.
And even then you don't want to create a joystick which pulls up when pushing forward.
In all honesty, I think we're saying the same thing.
There are two categories of possible criticisms: the model, and the implementation.
Fixing the implementation means changing code, improving APIs (e.g. local/remote branch delete).
Fixing the model means finding an everything different system. Yes, a graph-based VCS more complicated than a linear one. But it also matches realities of collaborative software development. And reality is complicated.
As you might guess, I'm sympathetic to criticisms of inconsistency or unnecessary effort, but I believe Git (and other DCVS) to have the completely correct idea about collaborative text versioning.
Fixing the implementation means changing code, improving APIs (e.g. local/remote branch delete).
Fixing the model means finding an everything different system. Yes, a graph-based VCS more complicated than a linear one. But it also matches realities of collaborative software development. And reality is complicated.
As you might guess, I'm sympathetic to criticisms of inconsistency or unnecessary effort, but I believe Git (and other DCVS) to have the completely correct idea about collaborative text versioning.
My problem is not the theory. That's easy to learn.
My problem is implementation.
My problem is implementation.
Ah, the easy one then.
Which DVCS implementation do you like the most?
Which DVCS implementation do you like the most?
The thing that gets me every time is the git sub-commands which have multiple orthogonal uses, without so much as a command line flag to differentiate them.
Maybe this would work great in a typed language where I might have `reset(File x)` and `reset(Commit x)` with different signatures... but for a CLI where everything is stringly-typed? Not so fun.
Also, god knows what happens here if there's a branch name with the same name as a file...
git reset abc # unstage file `abc`
git reset xyz # switch to commit `xyz`
or: git checkout mybranch # switch to branch `mybranch`
git checkout myfile # remove any local changes to `myfile` since the last commit
---Maybe this would work great in a typed language where I might have `reset(File x)` and `reset(Commit x)` with different signatures... but for a CLI where everything is stringly-typed? Not so fun.
Also, god knows what happens here if there's a branch name with the same name as a file...
Many command line tools have this problem, that's why the -- operator exists.
I'm not anywhere near an expert with git, but I'm proficient enough to use it effectively with my normal workflow. I like git, but admittedly the bar was set really low by subversion.
This article raises some valid points, though. One that resonates most with me is that git exposes its entire model. I really wish there was a git-lite that just had the few basic commands that junior developers can grok and not fuck up so I wouldn't have to waste my time explaining the same stuff for the umpteenth time.
This article raises some valid points, though. One that resonates most with me is that git exposes its entire model. I really wish there was a git-lite that just had the few basic commands that junior developers can grok and not fuck up so I wouldn't have to waste my time explaining the same stuff for the umpteenth time.
If you want a straight-forward mental model that works with git, try Gitless. Note, you will end up learning some new commands that simplify things, and you'll have to re-learn git if you work for someone that wants you to use the nitty-gritty, but every convenience has it's downside, and you just have to weigh that against the immediate benefits.
Edit: Thanks to lyall for the links. He posted below. [1]: http://gitless.com/ [2]: https://people.csail.mit.edu/sperezde/oopsla16.pdf
Edit: Thanks to lyall for the links. He posted below. [1]: http://gitless.com/ [2]: https://people.csail.mit.edu/sperezde/oopsla16.pdf
Linus is not a UX guy, and it shows.
However, he and many git users enamored of his style are perfectly willing to be condescending to anyone who points out the problems. Which itself is a problem.
Is hg easier to use? Or any other DVCS not created by such a bad UX practitioner?
I was a major user of hg from 2007-2012, before I succumbed to network effects. The UX of hg was more intuitive for users coming from SVN and CVS.
> The UX of hg was more intuitive for users coming from SVN and CVS
I second this. Trying to go from SVN to git left me confused and frustrated, while I found it much easier to switch to hg. Once I had been using hg for a while, I found that I had absorbed enough of the difficult/confusing stuff that switching to git was relatively painless.
I second this. Trying to go from SVN to git left me confused and frustrated, while I found it much easier to switch to hg. Once I had been using hg for a while, I found that I had absorbed enough of the difficult/confusing stuff that switching to git was relatively painless.
Hg is easier to use for mainly 2 reasons:
1. The UI is more consistent ie. the "update" command only does 1 thing updates your working directory to a specified state.
2. It doesn't have a pre-commit staging "index" like Git (or it at least doesn't expose it to the user. So workflow is a bit for straightforward ie. you don't need to constantly "add" files before you commit, it automatically does it for you.
1. The UI is more consistent ie. the "update" command only does 1 thing updates your working directory to a specified state.
2. It doesn't have a pre-commit staging "index" like Git (or it at least doesn't expose it to the user. So workflow is a bit for straightforward ie. you don't need to constantly "add" files before you commit, it automatically does it for you.
I personally love the staging component of git and would be lost without it. I often write a bunch of code working through a problem, because I think best that way, but it makes for a maintenance chore and a poor commit history, so I stage it into multiple commits when I'm done. This is absolutely trivial in git compared with other programs.
Plus, while the UX of git is not intuitive, especially from SVN, if you want to bypass staging and just use it like SVN, you can "git commit -a". Like svn, if you have new, untracked files, you can "git add -A; git commit". This is also trivial to alias.
Plus, while the UX of git is not intuitive, especially from SVN, if you want to bypass staging and just use it like SVN, you can "git commit -a". Like svn, if you have new, untracked files, you can "git add -A; git commit". This is also trivial to alias.
I've used both extensively and I think they're virtually identical. Mercurial is a bit nicer because it's written in Python, but git has github going for it.
In my experience, once you get into more complicated commands like rebase, I had to read a lot of docs to get things to work in both systems, so I'd say hg is easier to get started with but they're on par overall in terms of complexity.
As a sidenote, I think the ability to `rebase -i` work branches and squash, edit, and drop changesets is a very useful feature, and it's made very easy in git. Mercurial can rebase branches, but it really doesn't like it...
In my experience, once you get into more complicated commands like rebase, I had to read a lot of docs to get things to work in both systems, so I'd say hg is easier to get started with but they're on par overall in terms of complexity.
As a sidenote, I think the ability to `rebase -i` work branches and squash, edit, and drop changesets is a very useful feature, and it's made very easy in git. Mercurial can rebase branches, but it really doesn't like it...
As for Mercurial, I'd this RhodeCode is the company going for it, since we heavily invest in supporting Mercurial in our product.
hg's command-line interface is far better organized, yes, at least in the sense that it appears to have been organized rather than organically slapped together and papered over with "well it'd make sense if only you understood more about it".
Blaming users for not understanding a bad interface is one of the classic mistakes.
Blaming users for not understanding a bad interface is one of the classic mistakes.
hg's original workflow didn't encourage git style branches at all nor did it have any kind of stage IIRC. They've since been optionally added. Is that workflow in hg more intuitive or is only its far less powerful original workflow more intuitive?
It took me a while make the mental jump from svn style branches to git style and from no stage to having a stage but I'd never want to go back now that I understand them.
It took me a while make the mental jump from svn style branches to git style and from no stage to having a stage but I'd never want to go back now that I understand them.
This is not about workflow (though I do prefer hg's model of multiple types of branch-like constructs). This is about the command-line interface used to interact with it. Where git overloads commands (the same command can do vastly different things depending on options or context), or cannot make up its mind whether to implement functionality through top-level commands or flags to existing commands, hg is much more consistent in having a set of commands whose names match the operations they perform and are not overloaded with multiple contextual meanings.
For simple workflows (and certainly for beginners), hg is far easier to use than git. However when it comes to advanced usage, I personally find git more intuitive and frankly more powerful.
Granted, I learned git first and had been using it for 6 years before using hg.
Granted, I learned git first and had been using it for 6 years before using hg.
Search results for "how do I branch in Mercurial" always seem to lead to elaborate tutorials that suggest repo clones or bookmarks or numbered anonymous heads or smuggling diffs outside the commit graph using an extension. If the simple use cases don't include branching, that seems like a big problem for a DVCS.
It's been discussed on HN before, but gitless[1] is worth checking out. They've taken a structured approach[2] to finding git's most confusing UX "idiosyncrasies" and tried to address them. As a user of regular old git I can't personally speak to how successful they've actually been but it's interesting nonetheless.
[1]: http://gitless.com/
[2]: https://people.csail.mit.edu/sperezde/oopsla16.pdf
[1]: http://gitless.com/
[2]: https://people.csail.mit.edu/sperezde/oopsla16.pdf
Git is pretty difficult to learn, but the customizations it allows are amazing.
To get a "fancy oneline log" output, add the following to your `~/.gitconfig`
To get a "fancy oneline log" output, add the following to your `~/.gitconfig`
[alias]
ll = log --graph --oneline --decorate --date=short --all --pretty=format:'%ad %h %Cgreen%an %Cred%d %Creset%s'
then run git ll
It's great when rebasing your way out of spaghetti-commitlog situations.[deleted]
I believe --oneline and --decorate (and possibly --date=short as well) are redundant when specified with --pretty=format.
I personally have this in my ~/.config/git/config:
I personally have this in my ~/.config/git/config:
[alias]
lg = log --graph --pretty=format:'%C(auto)%h%d %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'All fair points. So what can we actually do about it?
Use something better? Like Fossil?
I find Fossil way, way more friendly and useful for individual users and teams.
http://fossil-scm.org/
I find Fossil way, way more friendly and useful for individual users and teams.
http://fossil-scm.org/
Well, I meant how do we actually make git better? It has become and absolute standard and is not going away anytime soon. Everyone knows it, and there's a huge ecosystem around it (last but not least Github). I actually think there's a lot of benefit to that kind of standardization. Personally, I actually like git, but that doesn't mean it can't or shouldn't be improved. I don't see switching to some relatively obscure alternative (or even to mercurial) as a satisfying solution. Of course, anybody who wants to do it should feel free, but that limits your possibilities for collaboration with the community at large.
Never heard of it before. Thanks! How's the learning curve?
But the major hosts don't support it.
Honestly, use mercurial.
Maybe if GitHub/GitLab allowed me, I'd do so. Even SVN, honestly.
It is not hard to use Github with mercurial. I don't have personal experience with gitlab though.
Why would you prefer SVN over git? I find git to be infinitely better than SVN. DVCS is a pretty good paradigm and the biggest (valid) complaint I have seen about git is that several of the commands such `git checkout` have multiple meanings which isn't a big enough deal to lose DVCS.
Why would you prefer SVN over git? I find git to be infinitely better than SVN. DVCS is a pretty good paradigm and the biggest (valid) complaint I have seen about git is that several of the commands such `git checkout` have multiple meanings which isn't a big enough deal to lose DVCS.
Git was inspired by BitKeeper, which is now open source. If you want the power of git without all the crappy UI, check out BK.
www.bitkeeper.org
www.bitkeeper.org
I think git was written to be distributed, hence merge being a front-and-center feature, but it is used as with a centralized repo (github/gitlab).
This leads to the UX that was initially planned becoming unwieldy. I think most organizations default to no-merge, rebase-and-commit-only mode, with master acting as the central branch to push to.
Hence what git needs to improve it's UX to a newcomer is to help define a repository to be in a "no-merge", and then help translate user's following actions:
git init
<make changes>
git commitchanges
<this lists current changes, and tracked, untracked files, and asks which are to be commited, and makes the commit>
git push
<pushed changes to origin .. automatically rebases, and prompts the user for any conflicts>
git pull
<pulls changes, automatically rebases, and prompts for any conflicts>
I'm convinced the entire workflow related to merges, and non-centralized features are what cause UX confusion for a new user.
This leads to the UX that was initially planned becoming unwieldy. I think most organizations default to no-merge, rebase-and-commit-only mode, with master acting as the central branch to push to.
Hence what git needs to improve it's UX to a newcomer is to help define a repository to be in a "no-merge", and then help translate user's following actions:
git init
<make changes>
git commitchanges
<this lists current changes, and tracked, untracked files, and asks which are to be commited, and makes the commit>
git push
<pushed changes to origin .. automatically rebases, and prompts the user for any conflicts>
git pull
<pulls changes, automatically rebases, and prompts for any conflicts>
I'm convinced the entire workflow related to merges, and non-centralized features are what cause UX confusion for a new user.
A lot of these complaints seem based on the fact that Git has features SVN doesn't and those features add complexity. Git really isn't that hard to learn. The trick is to take your time. If you try contributing to projects with complicated repos before you have a grasp on all the complexities, then yeah you're gonna have a bad time.
I could write a similar article about how FTP is so much easier to use than SVN and it would be equally silly.
That is not to say that Git isn't inconsistent and the docs are terrible, but there are good tutorials out there. If I were more helpful I'd have a link to one here but I'm on my phone.
I could write a similar article about how FTP is so much easier to use than SVN and it would be equally silly.
That is not to say that Git isn't inconsistent and the docs are terrible, but there are good tutorials out there. If I were more helpful I'd have a link to one here but I'm on my phone.
The primary goal of software development is to solve problems, not to perform elaborate rituals with version control systems or other tools (IDE's, Makefiles, etc.).
The primary function of a version control system is to recover earlier versions of the software in rare error situations where it is hard to figure out what has gone wrong. Backup to something that worked and identify the change that caused the problem.
For most software developers, a version control system should appear very simple so they can focus on solving the end user or customer or their own problem.
check-in <file | folder> o if the file is new for the project, the VCS should ask do you want to add this to the project? o check-in <folder> checks everything in the folder (directory) all at once. If the folder is new: do you want to add this folder to the project?
checkout <file | folder | project> [ <version> ] o checkout <file> checks out the most recent version of the file <file>. o checkout <folder> checks out the most recent versions of the files in <folder> and its sub-folders o checkout <project> checks out the most recent version of the entire project. The project can just be the specification of the top level folder! o <version> is an easy, human readable/understandable specification of the earlier version, a file sequence number such as 1.43, a folder or module sequence number, or an overall project sequence number (all generated automatically by the VCS -- at least by default).
For a single developer or a team in the same office or building or for that matter office park with a fast network, that is all you need. For remote collaboration -- such as China and USA -- then you might need one or two command to push/pull the code to remote repositories; this too should be simple!
KISS (Keep It Simple Stupid)
The primary function of a version control system is to recover earlier versions of the software in rare error situations where it is hard to figure out what has gone wrong. Backup to something that worked and identify the change that caused the problem.
For most software developers, a version control system should appear very simple so they can focus on solving the end user or customer or their own problem.
check-in <file | folder> o if the file is new for the project, the VCS should ask do you want to add this to the project? o check-in <folder> checks everything in the folder (directory) all at once. If the folder is new: do you want to add this folder to the project?
checkout <file | folder | project> [ <version> ] o checkout <file> checks out the most recent version of the file <file>. o checkout <folder> checks out the most recent versions of the files in <folder> and its sub-folders o checkout <project> checks out the most recent version of the entire project. The project can just be the specification of the top level folder! o <version> is an easy, human readable/understandable specification of the earlier version, a file sequence number such as 1.43, a folder or module sequence number, or an overall project sequence number (all generated automatically by the VCS -- at least by default).
All sorts of pain and suffering is avoided by dividing the project into folders for different components and contributors and/or teams. These check-in/check-out their folder independently.
The VCS should be very simple and take care of everything, such as maintaining a sequential overall project number as well as file sequence numbers, automatically behind the scenes.For a single developer or a team in the same office or building or for that matter office park with a fast network, that is all you need. For remote collaboration -- such as China and USA -- then you might need one or two command to push/pull the code to remote repositories; this too should be simple!
KISS (Keep It Simple Stupid)
I'm working with a small team that uses CVS and I'm I'm in charge of recommending more modern version control software. I've been learning git since it seems to be the new standard, but after reading this, I don't think we have the time it will take to learn it. Is there another open source vcs that would be a more natural upgrade to CVS?
Specifically for the requirement "Is there another open source vcs that would be a more natural upgrade to CVS": the answer is hands down Subversion for that requirement. If you want distributed or "more modern" but not git, perhaps Mercurial or Bazaar, but they're less prevalent choices.
Thank you! Subversion does seem like a great fit. Mercurial seems like it might be easier to use (Facebook uses their own customized version [1]), but we don't need distributed at this time.
[1] https://changelog.com/posts/facebook-mercurial-git
[1] https://changelog.com/posts/facebook-mercurial-git
I started using git as a hobbyst with the help of smartgit. It somehow made me realize what is git all about the 200x better than any tutorial. I use command line too, but things like diffing, adding files etc. it just makes life easier. Seriously you're a masochist if you don t use it. It'd free for personal use!
A thought: if you think you can make git better, why not just write a DSL (domain specific language) on top of it?
I mean, it already does everything under the sun, so there's a challenge for anyone up for it!
I mean, it already does everything under the sun, so there's a challenge for anyone up for it!
Even better - write a chat bot for git hahaha :D make it so it can help you get out of tricky situations and not have search stackoverflow all the time
I have not had this problem recently because moved from Windows to Mac, but at some point about 8 years ago was the way git handled windows line endings was truly maddening.
To this day I never understand how to handle line endings correctly. I mean, when I have issues, I would need to google, and then forget again. Fortunately I don't have to work on windows that much.
It's weird to see an exclamation point after "detached head state". Checking out a specific commit is easy to do in SVN too.
Considering that svn is a half implemented VCS where everything is a branch but merging is a royal PITA I'll take Git's warts.
Yeah, at Bazaarvoice we invented our own tool to keep information about branches for simple rebase and merge of feature branches.
"In the beginning, all you want are results. In the end, all you want is control."
[deleted]
The crucial criticism:
The fundamental promise of any version control system is this: “Once you put your precious source code in here, it’s safe. You can make any changes you like, and you can always get it back”. Git breaks this promise. Several ways a committer can irrevocably destroy the contents of a repository:
Mandatory XKCD: [1]
[1] https://xkcd.com/1597/
The fundamental promise of any version control system is this: “Once you put your precious source code in here, it’s safe. You can make any changes you like, and you can always get it back”. Git breaks this promise. Several ways a committer can irrevocably destroy the contents of a repository:
git add . / … / git push -f origin master
git push origin +master
git rebase -i <some commit that has already been
pushed and worked from> / git push
That should not be possible.Mandatory XKCD: [1]
[1] https://xkcd.com/1597/
A previous criticism was that you had to know about a set of things including the reflog in order to use git. The reflog is one of several ways to undo the "irrevocable destruction" above. Complaining about both issues feels like double-dipping :)
Also, I suspect that many of the "hosted git" implementations out there prevent this from happening by default. I know that both of the ones I use in my day job (gitlab and bitbucket) do, but I'm not 100% certain it's a default as opposed to something our ops guys did. In any case, far from impossible. EDIT: see boaardwalk's post.
Also, svn won't protect you from `rm -rf /` on the server, while git will, which is pretty cool.
Also, I suspect that many of the "hosted git" implementations out there prevent this from happening by default. I know that both of the ones I use in my day job (gitlab and bitbucket) do, but I'm not 100% certain it's a default as opposed to something our ops guys did. In any case, far from impossible. EDIT: see boaardwalk's post.
Also, svn won't protect you from `rm -rf /` on the server, while git will, which is pretty cool.
git config receive.denyNonFastForwards true
Should it be the default? Probably, but it's trivial to fix.Git CLI, aka designed in hell!!
[deleted]
[deleted]
downer72(1)
I'd like git to be aware of the grammar of the files it's diffing and merging.
It could use neural network for this for all I care. Anything but merging lines as if they contained completely meaningless string of characters.
It could use neural network for this for all I care. Anything but merging lines as if they contained completely meaningless string of characters.
Hi. Thanks for downvote. Although pointing me to some smart mergetool would be even more appreciated.
I've been using git for 7 years now. Never used anything else for version control (besides visual source safe which I try to forget).
Never felt the need or desire to try anything else.
Never felt the need or desire to try anything else.
Genuinely curious as to why I'm getting down voted without explanation for stating my opinion.
I'd not downvote your comment but I'd like to point out you have a biased perception. You clearly state you never used anything else and then you say you never felt the need to use anything else.
It's not unlike a programmer who only knows GWBASIC saying they feel no need for recursion because they never wrote any code that relied on it, or named functions, because subroutines can do that. Or a C programmer who thinks class-based inheritance is superfluous syntactic sugar.
I don't mean it as an offense, mind you, but your lack of experience in DVCSs makes your opinion suspect. Spend a month actually working with Bzr or Mercurial and then, having been exposed to different solutions to the same problem, your opinions will be much richer.
It's not unlike a programmer who only knows GWBASIC saying they feel no need for recursion because they never wrote any code that relied on it, or named functions, because subroutines can do that. Or a C programmer who thinks class-based inheritance is superfluous syntactic sugar.
I don't mean it as an offense, mind you, but your lack of experience in DVCSs makes your opinion suspect. Spend a month actually working with Bzr or Mercurial and then, having been exposed to different solutions to the same problem, your opinions will be much richer.
My point wasn't that the others weren't good. It was that git has always met all my requirements and I never ran into any issues that made me want to try another solution.
And some points about the article. Git is a framework actually, you need some workflow to use it in a team. So git requires a lot of discipline from all team members. You can't just "commit" as in subversion, you must understand what are you doing. So you can't directly compare git with something like subversion. And git ≠ github.
Some points are valid: bad and unclear documentation, no "included" workflows, bad command line UI. Author also didn't mention authorship issues, it's a real pain.