banner



How To Create A Project In Bitbucket

There are lots of hosting service providers for version control using Git like Github, Bitbucket, Gitlab, Sourceforge, Launchpad etc. But Here I am only explaining two of them. Github and Bitbucket.

GitHub Inc. is a web-based hosting service for version control using Git. It is mostly used for computer code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features.

GitHub brings together the world's largest community of developers to discover, share, and build better software. From open source projects to private team. But it is commonly used to host open-source software projects because the private repositories cost money.

Now coming to Bitbucket, it is also a web-based version control repository hosting service owned by Atlassian, for source code and development projects that use Git revision control systems.

The main advantage of Bitbucket over GitHub is, it offers free accounts with an unlimited number of private repositories (which can have up to five users in the case of free accounts). Bitbucket integrates with other Atlassian software like Jira, HipChat, Confluence, and Bamboo.

Where do I push my project?

  • If we need our project to be public or opensource, choose GitHub.
  • If our project to be private or limited to our team members, choose Bitbucket.

Note: GitHub support Private repositories but we have to pay for it. Also, Bitbucket supports Public repositories but GitHub is more popular and we get more attention from developers for an open-source project.

Before adding our project to GitHub/Bitbucket

Before trying to add our project to GitHub or Bitbucket, we need to globally install Git on our system. The installation procedure of Git for various OS is explained below.

Linux (Ubuntu/Debian)

In Ubuntu/Debian based systems, Git can be downloaded easily using Advanced Package Tool (APT). The below command installs Git on our system.

Linux (Fedora/Red Hat)

We can install Git on Fedora/Red Hat based systems using the yum tool. The below command installs Git on our system.

MacOS

We can simply download.dmginstaller file for macOS from the below URL and can be installed.

Windows

If we are using Windows OS, direct to the below URL and we can get a.exefile which is the default installation file in Windows.

ADDING PROJECT TO GITHUB

I am going to explain the steps in adding a project to the remote repository on GitHub.

We need to register for an account in GitHub first. Then go the URL below.

https://github.com/new

Enter a repository name and description as in the snippet below.

Image is loading...

This will lead us to a page like below which contains the remote repository URL and all the commands to push our project to the repository we created.

Image is loading...

First, we have to initialize our project directory as a local repository by running the below command from the root directory of our project.

git init

Now add all the files and folders under our project directory to git.

git add .

We need to commit these change.

git commit -m "Initial commit"

After that, set the remote repository URL to the project directory(local repository).

          git remote add origin            [your_remote_repository_url]                  

Now push all files to the remote repository. The below command pushes our project to a master branch in our remote repository.

git push -u origin master

ADDING PROJECT TO BITBUCKET

After creating an account in Bitbucket, direct to the below URL to create a new remote repository.

https://bitbucket.org/repo/create

Image is loading...

This will lead us to a new page as below. From here we get the URL of our remote repository and instructions to push our project to it.

Image is loading...

First, we have to initialize our project directory as a local repository by running the below command from the root directory of our project.

git init

Now add all the files and folders under our project directory to git.

git add .

We need to commit these change.

git commit -m "Initial commit"

After that, set the remote repository URL to the project directory(local repository).

          git remote add origin            [your_remote_repository_url]                  

Now push all files to the remote repository. The below command pushes our project to a master branch in our remote repository.

git push -u origin master

If you are willing to learn the complete guide on Git, take a look at the tutorial. Git – A Beginner's Guide with Commands and Operations

How To Create A Project In Bitbucket

Source: https://www.techomoro.com/adding-an-existing-project-to-github-or-bitbucket/

Posted by: coxduccies.blogspot.com

0 Response to "How To Create A Project In Bitbucket"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel