<p><strong>The Git Server</strong></p>

<p>It's best practice to setup a Git server for the team to access.  This way you have a central server that can be maintained, backed up, and focus on serving the source code.</p>

<p>While you could create your own, there are also several popular commercial options available that often have free private repositories (non-exhaustive list):</p>

<ul>
<li><a href="https://bitbucket.org/product/" rel="nofollow noreferrer">Bitbucket</a></li>
<li><a href="https://github.com" rel="nofollow noreferrer">GitHub</a></li>
<li><a href="https://aws.amazon.com/codecommit/" rel="nofollow noreferrer">AWS CodeCommit</a></li>
</ul>

<p>The Git server will just be a repository for your code.  It will allow for workflows like <a href="https://www.atlassian.com/git/tutorials/making-a-pull-request" rel="nofollow noreferrer">Pull Requests</a> to better manage the changing code base.  However, the Git Server will not build your code or deploy it anywhere.</p>

<p><strong>Jenkins</strong></p>

<p><a href="https://jenkins.io" rel="nofollow noreferrer">Jenkins</a> will not actually store your source code.  Instead it is a tool used for <a href="https://en.wikipedia.org/wiki/Continuous_integration" rel="nofollow noreferrer">Continuous-Integration</a> (CI) and <a href="https://en.wikipedia.org/wiki/Continuous_delivery" rel="nofollow noreferrer">Continuous Deployment</a> (CD), a big part of DevOps culture.  The basic idea is that the Jenkins server will take the source code put into your Git server, ensure it compiles, automated tests pass, and possibly even deploy to your test environment.  Tools like Jenkins work with multiple programming languages.  </p>

<p><a href="https://maven.apache.org/what-is-maven.html" rel="nofollow noreferrer">Maven</a> is a tool is specific to building Java projects.  Tools like Jenkins often have options to use Maven to build the project.</p>

<p>Setting up a CI/CD tool like Jenkins would be a great next step after you have a consistent place for everyone to store their code.</p>

<p><strong>Best Solution</strong></p>

<p><a href="https://about.gitlab.com/" rel="nofollow noreferrer">Gitlab</a>, <a href="https://bitbucket.org/product/features/pipelines" rel="nofollow noreferrer">Bitbucket Pipelines</a>, <a href="https://azure.microsoft.com/en-us/services/devops/?nav=min" rel="nofollow noreferrer">Azure DevOps</a> are just three examples of tools that both house Git repositories and can do CI/CD. There are many options available for Git and CI/CD, and you can even combine them if you choose not to select an all-in-one solution.  Which tools are best is opinion based, and the best practice is to use a tool that helps manage your Git repositories and a tool for CI/CD.</p>

CC BY-SA 4.0
2019-10-15T14:23:53.160Z
Gitlab is as well a very good option. In addition it offers integrated CI so no need for Jenkins.
papanito
CC BY-SA 4.0
2019-10-17T06:27:14.363Z
So I can install gitlab solution on my own server and Jenkins is not needed in this case?
genderbee
CC BY-SA 4.0
2019-10-17T11:31:16.720Z
@genderbee Correct.  Gitlab, Bitbucket Pipelines, Azure DevOps are just three examples of tools that both house Git repositories and can do CI/CD.  There are many options and you can even combine them.  Which one is best is opinion based, but the best solution is to use a Git tool along with a tool for CI/CD.
Wesley Rolnick
CC BY-SA 4.0
2019-10-15T14:17:16.963Z
2019-10-17T11:37:19.430Z
2019-10-17T11:37:19.430Z
Wesley Rolnick
<p>What is the best git solution for java code development? Make my <a href="https://www.linux.com/tutorials/how-run-your-own-git-server/" rel="nofollow noreferrer">own git server</a>? Developers (Linux, Mac, Windows) are working on their local computers, then they are using my own git server.</p>

<p>Would Jenkins with Maven be a better solution? What is the benefit?</p>

<p>Thank you.</p>

<p><strong>Update</strong></p>

<p>I would like to find the best, lean, and simplest solution for our develop team. Here is some info:</p>

<ul>
<li>Team of about 10 developers.</li>
<li>Everybody has their own LOCAL (windows, mac, linux), and their own IDE.</li>
<li>Project could be developed in java, php, javascript, css, html. I think this is not important for now.</li>
<li>My conception is, that I have 3 servers, 1st for DEV, 2nd for TEST and 3rd for PRODUCTION.</li>
<li>Every server has own git environment, as I mentioned above.</li>
<li>Process should be from LOCAL -> DEV (check by lead developer), then from DEV -> TEST (check by customer), then from TEST -> PRODUCTION.</li>
<li>And this is question if is Jenkins / Maven useful, or only git is sufficient.</li>
</ul>

<p>Thanks.</p>

CC BY-SA 4.0
2019-10-15T07:50:00.393Z
Could you show some of the research that you've done regarding this question? There is no way to answer this question, specifically because it is posed in superlative terms (ie "best"). If you could describe more of your situation's constraints, that would help too.
Bruce Becker
CC BY-SA 4.0
2019-10-15T08:09:29.733Z
@BruceBecker See my update, please. Thanks.
genderbee
CC BY-SA 4.0
2019-10-15T08:16:33.137Z
very nice, thanks :)
Bruce Becker
CC BY-SA 4.0
2019-10-16T06:20:44.047Z
Please think about docker support / docker deployments. This migth be a topic very hard to get into but then it runs smoothly. But depends on the techs your devs are using
Spears
<jenkins><git>
Best solution for code develop
genderbee
# Best solution for code develop

(Asked by: username_0 on 2019-10-15)

What is the best git solution for java code development? Make my [own git server](https://www.linux.com/tutorials/how-run-your-own-git-server/)? Developers (Linux, Mac, Windows) are working on their local computers, then they are using my own git server.

Would Jenkins with Maven be a better solution? What is the benefit?

Thank you.

**Update**

I would like to find the best, lean, and simplest solution for our develop team. Here is some info:

* Team of about 10 developers.
* Everybody has their own LOCAL (windows, mac, linux), and their own IDE.
* Project could be developed in java, php, javascript, css, html. I think this is not important for now.
* My conception is, that I have 3 servers, 1st for DEV, 2nd for TEST and 3rd for PRODUCTION.
* Every server has own git environment, as I mentioned above.
* Process should be from LOCAL -> DEV (check by lead developer), then from DEV -> TEST (check by customer), then from TEST -> PRODUCTION.
* And this is question if is Jenkins / Maven useful, or only git is sufficient.

Thanks.

**Tags:** jenkins, git

> **Comments:**
> **username_1**: Could you show some of the research that you've done regarding this question? There is no way to answer this question, specifically because it is posed in superlative terms (ie "best"). If you could describe more of your situation's constraints, that would help too.  
> **username_0**: @BruceBecker See my update, please. Thanks.  
> **username_1**: very nice, thanks :)  
> **username_2**: Please think about docker support / docker deployments. This migth be a topic very hard to get into but then it runs smoothly. But depends on the techs your devs are using  

---

## 1 answers

### Answer by username_3 on 2019-10-15. Score: 4

**The Git Server**

It's best practice to setup a Git server for the team to access. This way you have a central server that can be maintained, backed up, and focus on serving the source code.

While you could create your own, there are also several popular commercial options available that often have free private repositories (non-exhaustive list):

* [Bitbucket](https://bitbucket.org/product/)
* [GitHub](https://github.com)
* [AWS CodeCommit](https://aws.amazon.com/codecommit/)

The Git server will just be a repository for your code. It will allow for workflows like [Pull Requests](https://www.atlassian.com/git/tutorials/making-a-pull-request) to better manage the changing code base. However, the Git Server will not build your code or deploy it anywhere.

**Jenkins**

[Jenkins](https://jenkins.io) will not actually store your source code. Instead it is a tool used for [Continuous-Integration](https://en.wikipedia.org/wiki/Continuous_integration) (CI) and [Continuous Deployment](https://en.wikipedia.org/wiki/Continuous_delivery) (CD), a big part of DevOps culture. The basic idea is that the Jenkins server will take the source code put into your Git server, ensure it compiles, automated tests pass, and possibly even deploy to your test environment. Tools like Jenkins work with multiple programming languages.

[Maven](https://maven.apache.org/what-is-maven.html) is a tool is specific to building Java projects. Tools like Jenkins often have options to use Maven to build the project.

Setting up a CI/CD tool like Jenkins would be a great next step after you have a consistent place for everyone to store their code.

**Best Solution**

[Gitlab](https://about.gitlab.com/), [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines), [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/?nav=min) are just three examples of tools that both house Git repositories and can do CI/CD. There are many options available for Git and CI/CD, and you can even combine them if you choose not to select an all-in-one solution. Which tools are best is opinion based, and the best practice is to use a tool that helps manage your Git repositories and a tool for CI/CD.

> **Comments:**
> **username_4**: Gitlab is as well a very good option. In addition it offers integrated CI so no need for Jenkins.  
> **username_0**: So I can install gitlab solution on my own server and Jenkins is not needed in this case?  
> **username_3**: @username_0 Correct.  Gitlab, Bitbucket Pipelines, Azure DevOps are just three examples of tools that both house Git repositories and can do CI/CD.  There are many options and you can even combine them.  Which one is best is opinion based, but the best solution is to use a Git tool along with a tool for CI/CD.  

---

