قالب وردپرس درنا توس
Home / Tips and Tricks / Should you use a Git alternative? – CloudSavvy IT

Should you use a Git alternative? – CloudSavvy IT



  Git Logo

Git is incredibly popular and supported almost everywhere. Since it is practically the standard version control system, it begs the question, what are your alternatives? Are they worth considering, and how do they differ?

Note that this article discusses alternatives to git as a source checking software. If you're just looking for alternatives to a hosted service like Github, you can read our guide to hosted Git solutions instead.

The Downsides of Git

To better understand the limitations of Git, we must first start with what it does well.

Git uses a distributed source control model; each user's local repository is not really connected to a central server. That user can go offline, make a lot of changes, and no one else will see those changes until pushed to the remote. This works extremely well for open source software development; Git is much faster for most actions, since individual users can all clone a repository and make their own small changes without worrying about what other people are doing.

These changes can be integrated into the master repository with pull requests (the user making the master repository change requests to pull commits from their private version of the repository), and pushed updates from authenticated users, provided that all merge conflicts are correct have been solved.

This model makes a lot of sense for this distributed development environment, but the problem with Git comes when you try to adapt it for use in a corporate environment, where you will often have many people working on the same pieces of code, and good coordination is the key.

wrong here ̵

1; it's still fantastic, especially when combined with third-party bug tracking software and CI / CD pipelines, something that services like GitLab and BitBucket do quite well. But Git wasn't exactly built to be corporate resource management, where you'll almost always have a central server as the main repository. It requires very correct use (and often external tools) to be effective for agile teams that make a lot of code changes.

With Git, each customer stores a full copy of the project changelog. Every time you make a commit in Git, it saves the changes made locally on your system. This makes working with Git very fast, since you only have to query a hard disk and no central server. It is also much easier to work with it offline. However, for large projects with a long change history, this can also cause the .git folder to take up an unreasonable amount of space.

If you have multiple projects, you probably don't want the source code for everything visible to every developer. In Git, this problem is usually solved by having separate repositories for each project, which works quite well but is not ideal if you need to integrate them into one cohesive piece. With centralized version control you can only grant access to specific folders.

So, while Git is probably not the wrong choice for your business, especially if implemented properly, there are other source management options built in specifically for business workflows, and it might be worth checking out looking at the competition.

RELATED: How to Set Up a Personal Gitlab Server

The Primary Alternative: Centralized Version Control

The most common difference between Git and the alternatives is the interruption of decentralized versioning in favor of a central, authoritative server. Apache Subversion and Team Foundation Version Control are major version control systems that follow this format.

For comparison, in a DVC system, each user has a local repository where they record their own changes. When they are ready to send updates to the master server, other users may have different versions of the same file you are working on. This is known as a merge conflict, and it is a common (though easily fixable) problem with Git.

 Decentralized Version Control

In Centralized Version Control (CVC) like Apache Subversion, there is a single server repository and many clients are directly connected to it. If you make a change to a file, that file will be updated on other users' computers when they are updated. Assignments are made directly to the master server.

To prevent merge conflicts, most CVC systems use locks. If user A wants to work on a file and doesn't want anyone else to mess with it, they can lock the file until they're done so that other users can't do the same. This is not required in Subversion, and merge conflicts can still occur, but they are less of an accident.

 centralized version management

The problem is usually resolved by branching and local copies, which allows multiple users to work on their own versions for a longer period of time before merging changes.

Another great feature of centralized version control is permission management; instead of giving access to the entire repository, CVC makes it easy to split access to specific folders. Team Foundation versioning works in much the same way as Subversion, allowing delegated permissions to be transferred down to the file level.

All of these features make centralized version management a viable alternative to DVC. After all, Google hosts all of their code in one huge, centralized system, much larger than any distributed system can handle. Granted, the Windows codebase is a 300 GB Git repository, but it uses Git's Virtual File System plugin, which allows users to download only the files they need, and nothing more.

A disadvantage of Subversion, however, is that it often requires a lot of copying and downloading, which can make it much slower than Git's local model.

RELATED: The Best Alternatives to Github [19659004] Other Alternatives

While we've focused on centralized version control systems that can replace Git, there are other distributed version control systems you can use, most notably Mercurial .

Mercurial is a bit easier to use than Git, and they are both about the same in terms of performance, but generally very similar. There's really not much reason to choose Mercurial over Git other than personal preference, which probably shouldn't dictate business decisions.

Mercurial was an option in BitBucket, but they recently dropped support for it, the primary reason being that Git is simply much more popular and widely supported. It's practically the standard version control system, and unless an alternative radically changes the model (like CVC), it's not worth considering.


Source link