Skip to main content

Stating off with Git & Bitbucket on Linux (Beginners guide)

Okay! It has been few years since I started on software development. Which I started off with Java. Since most of the projects were only handled by myself there wasn't much of a need in version control system.

But since now I have started working on my projects under my tech startup "Eno8" things got bit complicated. So I did a research on version control. All thanks must go to my good colleague Ruwan Ranganath for pointing me where to start.

Turns out that Github is one of the best cloud version control platforms available. But there is one major problem. All the codes published in Github are totally public, But they have a payable scheme for free projects which is not the perfect scenario for me as I'm looking to reduce my expenses in all possible ways.

Then I found Bitbucket which is a great platform offers to host free private projects with up-to 5 collaborators. This was the best solution for me. They offer both de-centralized version control systems which are Git and Mercury. I selected Git.

You can create a new Bitbucket account and a new git repository following https://bitbucket.org

You can follow below steps to install Git on your Linux based OS. (Source)

Step 1: Installing Git


We can install Git without having to add any repositories.

apt-get install git

Step 2: Configuring Git


Git works best if you give it some basic information: your name and your email address. You can set these options in Git with the following commands: Email shoud be the email which you used to create the Bitbucket account.

git config --global user.name "Your Name"
git config --global user.email "email@example.com"



Now the basic configuration is done you can clone the created repository to your local computer.

Step 1: Local Setup

First create a local folder to store project data.
Then open your terminal and navigate to the created folder using "cd" command.

Step 2: Cloning

Go to your Bitbucket repository page. Under overview you can find the clone URL for your repository. 
Then enter below command in terminal

git clone clone_URL

Which will successfully clone the project in your local folder.

You can follow this excellent guide by Bitbucket to continue working on your cloned project.



Comments

Popular posts from this blog

Install XAMPP on Ubuntu/Linux (Beginners guide)

Hi fellow developers. If you are a web developer you will definitely need a local server in your computer to test and debug your code. There are lot of server applications ever operating systems which provides various features when it comes to server configuration. Apache is one of the most popular server platform. But only the server is not enough you will need to install a database application, email servers and much more counterparts in order to get started which might be quite frustrating. To resolve this there are pre-packed server applications like XAMMP, WAMP, EasyPHP etc. Mine favorite is XAMPP but no special reason. So here's how you install XAMPP on linux based OS/Lubuntu in my case. Step 1: Download XAMPP You can download the official XAMPP following below link. https://www.apachefriends.org/download.html Step 2: Installation Open the location where the downloaded file is exists by using terminal, if my downloaded file exists in Downloads directory. e.g: cd /...