6 ms·
Long time user of both bazaar and git here. > To be fair git is junk; git's UI could certainly benefit from some simplification ; this doesn't make git junk,
by Ace17 9y ago
Long time user of both bazaar and git here.
> To be fair git is junk;
git's UI could certainly benefit from some simplification ; this doesn't make git junk, especially considering that it's incredibly fast and reliable.
> it's just the standard so everyone has mostly learned it and it gets the job done, but at least Mercurial is better. Probably bzr too.
Bazaar and git actually have lots in common, they both have the advantages of DVCS (which seem to be often confused with "the advantages of git") (like, say, "rename"?)
Here are the main differences I noticed:
Bazaar is definitely slower, but you need an big-open-source-sized repo before noticing the difference.
Bazaar doesn't have "rebase" by default, but you can install it as a plugin and it works.
Bazaar has an optional "automatic push after each commit", which encourages linear history, and which I find to be more appropriate 90% of the time in a small experimented team (small and frequent commits instead of feature-branches).
Bazaar's UI uses revision numbers instead of commit hashes, this makes lots of things easier, like knowing which of two commits came first, telling a commit number to your coworkers, or bisecting without requiring the support from the VCS ( git-bisect ).
Bazaars allows remotely fetching one single revision from a repo, without requiring to download the whole history. You can't do this with git. The best I found was to loop "git fetch --depth N" with an increasing value of N until the "git checkout <commit_number>" succeeds. This is a pain, especially when working with submodules.
Bazaar doesn't have an index (aka "staging area"), and by default, "bzr commit" will commit all the local modifications. Considering that partial commits are dangerous (test suites generally don't track what's in the index, creating a mismatch between "what was tested" and "what's being pushed"), this is a welcomed simplification (of course, you can "git stash/bzr shelve" if needed).
Bazaar doesn't make a difference between a branch, a repo, and a working copy. All of these are repositories (potentially sharing ancestors) accessible through an URL. So there's no need for "remotes", you directly push/pull to/from an URL (no, you don't have to re-specify it each time).
I hope no git user was harmed during the reading of this post :-)
- mushishi 9y agoIf by "test suites" you mean automatic testing, then I probably don't agree. The flow goes like this for me: - Make small amount of new code backed by tests in a feature branch - Run some tests locally (not all) - Push to the feature branch - CI will run all the tests - If a test fails, I get a notification about it in my IDE and can fix it immediately I personally enjoy having staging area (and IDE supported local stash) that help me keep small amount of difference to the origin for development purposes.
- chronial 9y agoRegarding your fetch issue: you can just specify the Sha/tag/Branch head that you want to fetch
- Kubuxu 9y ago> Bazaars allows remotely fetching one single revision from a repo, without requiring to download the whole history. You can't do this with git. The best I found was to loop "git fetch --depth N" with an increasing value of N until the "git checkout <commit_number>" succeeds. This is a pain, especially when working with submodules. There is also `git clone --depth 1` but you have to use ssh+git protocol
- Ace17 9y agoI don't want HEAD, I want a specific commit. How do I specify this from a "git clone" command line, as you're suggesting?
- chronial 9y agoI don't think that's possible. You'd have to `git init`, `git remote add ...`, `git fetch --depth 1 MYREMOTE MYCOMMIT`. If this is a frequent case for you, you could easily add an alias for this.
- Ace17 9y ago$ git init Initialized empty Git repository in /tmp/phobos/.git/ $ git remote add origin https://github.com/dlang/phobos.git https://github.com/dlang/phobos.git $ git fetch --depth=1 origin 6e5cdacfa6ac018c6ef42aa9679893676f293f21 error: no such remote ref 6e5cdacfa6ac018c6ef42aa9679893676f293f21 However, the commit exists: $ git fetch --depth=1000 [... a long time after ...] $ git checkout 6e5cdacfa6ac018c6ef42aa9679893676f293f21 Note: checking out '6e5cdacfa6ac018c6ef42aa9679893676f293f21'. [...] HEAD is now at 6e5cdacf... phobos 0.2
- chronial 9y agoThis looks like github configuration. My (probably newer) git tells me: $ git fetch --depth=1 origin 6e5cdacfa6ac018c6ef42aa9679893676f293f21 error: Server does not allow request for unadvertised object 6e5cdacfa6ac018c6ef42aa9679893676f293f21 Note that this works fine and has the same effect: $ git fetch --depth=1 origin phobos-0.2 If you want the first command to work, you will probably have to host somewhere other than github.
- dreamcompiler 9y ago> Bazaar doesn't have an index (aka "staging area"), and by default, "bzr commit" will commit all the local modifications. Mercurial works this way too. I strongly prefer Mercurial to git, but I like partial commits and the staging area is one of the few things about git I wish Mercurial had.
- deleted 9y ago[deleted]