What is the relationship between Git and Stash?

39,323

Solution 1

Some brief information about Stash and Git.

Git is a distributed version control system.

Stash is a repository management system of Atlassian. It can be used to manage Git repositories, also it can be used to manage repositories of other version control system like mercurial.

A good overview for each product can be found in their official sites;

Git official site, about page

Atlassian official site. In September 2015, Atlassian renamed their Stash product to Bitbucket Server.

There are many repository management system you can use with Git. One of the most popular is Stash in Enterprise world. But when you look to open source world, GitHub is the most popular one as far as I know.

You can create repository, push, or pull your code into Git repositories whether they are in your local computer or they are in remote corporate servers. Using a repository management system ( like Stash) for this kind of task is not necessary, but It is sometimes preferred, especially by the companies which has huge It departments.

So, Git, and Stash are not alternative but complementary to each other. You can think Git as a kernel and stash as the shell surrounding the kernel.

But, why we need repository management systems;

  1. Security; huge corporates wants to manage who can access which projects source file with what restrictions. Git can not handle this, it is just VCS.
  2. Administration; You can integrate with corporate LDAP system, You can manage user easier.
  3. Integration; You may have Jira for issue tracking, bamboo as build server and confuluence as wiki. And you can easily integrate them because all of them Atlassian's tools.
  4. Ease of use

Now, Lets try to answer your questions;

I can access my company Stash project repositories. I cloned the project into my local Git repository

Whether Code repository is on remote server behind stash or it is in local computer. It is a Git repository.

Git is just a facilitator to communicate with Stash?

No, Vice versa is more correct. Git is the core of VCS, you use stash to make it more manageable, secure, and easy to use in your corporate.

Can't we use Git as distributed repository instead of Stash?

First you can not use Git instead of Stash, because they are not alternative to each other. But they are complement to each other.

If you mean using Git as remote repository, sure you can use it.

For clarification, Git is distributed not because you can have remote repositories. Whether centralized or distributed, you can have remote repository on all VCS. Distributed means, when you clone a repository, you also clone all history etc. In this structure, you can have a central repository but it is not required. If centrol repository get corrupted, it is not a big deal, any node can become new central repository. Even though in corporate world having a central repository is best practice, some open source projects ( for instance Linux kernel) don't have a central repository.

What is the relationship between those two tools?

I think it is already explained above. They are complementary to each other. Git is the VCS, and stash is repository management tool. It makes Git more secure and manageable for corporate IT departments.

Without Git, can the code be cloned, committed to Stash? Or, without Git, can Stash exist?

It is already explained as well. You can use Stash with other VCS. Git is not necessary. But you need at least one VCS.

You can not commit/clone code to/from stash. You can commit/clone code to/from VCS via stash.

VCS: Version Control System

Solution 2

Git is just a facilitator to communicate with Stash?

No. Git is a very popular, and impressively versatile code revision system, distributed collaboration tool, code archiver, patch manager etc. See git-scm.org.

Atlassian Stash is management tool for Git.

Can't we use Git as distributed repository instead of Stash?

You probably can, but that's up to why you use Stash. Stash is supposed to make your life easier as soon as you have multiple collaborators and repos to worry about.

What is the relationship between those two tools?

Answered above.

Without Git, can the code be cloned, committed to Stash? Or, without Git, can Stash exist?

Nope.

Basically, reading the introductory documentation pages of Stash would have answered this. I wonder why you didn't do that. I still urge you to do it; you'll learn interesting things!

Share:
39,323

Related videos on Youtube

Vinee-the-Pooh
Author by

Vinee-the-Pooh

Updated on September 05, 2020

Comments

  • Vinee-the-Pooh
    Vinee-the-Pooh over 3 years

    I can access my company Stash project repositories. I cloned the project into my local Git repository through Eclipse IDE. For that, I installed required Git plugins into Eclipse.

    My questions are:

    • Git is just a facilitator to communicate with Stash?
    • Can't we use Git as distributed repository instead of Stash?
    • What is the relationship between those two tools?
    • Without Git, can the code be cloned, committed to Stash? Or, without Git, can Stash exist?
  • GOXR3PLUS
    GOXR3PLUS over 5 years
    What a brilliant answer ! Could upvote 50 times if it was allowed !!!!
  • ranit.b
    ranit.b about 2 years
    @GOXR3PLUS That's exactly why it is not allowed :)
  • GOXR3PLUS
    GOXR3PLUS about 2 years
    @ranit.b hahahah :)