Git Beyond the Clouds: How Code Travels, Collaborates & Secures Itself Part 3

Git Beyond the Clouds: How Your Code Travels the World Securely

๐Ÿ”ง Git & Bitbucket: The Backbone of Team Collaboration | Part 3

๐Ÿ“˜ Authored by: Kalyan Kalavena

Welcome back, friends! ๐Ÿ‘‹

In our previous blog, we explored the foundations of Git. Today, we dive deeper into Bitbucket, the self-hosted Git repository tool preferred by enterprises due to its security, Jira integration, and team collaboration features.

๐Ÿ I. Why Bitbucket over GitHub?

Unlike GitHub, Bitbucket Server offers more control and can be deployed in your infrastructure—ideal for enterprise DevSecOps needs.

๐Ÿ› ️ II. Bitbucket Installation Prerequisites

Minimum Git version: 2.11+

CentOS 7 comes with Git 1.9 (too old). Upgrade manually or switch to CentOS 8.

yum install git -y

๐Ÿ’ป III. VM Setup for Bitbucket Server

  • Assign a static IP address (AWS: Elastic IP, GCP: reserved IP)
  • Open required firewall ports: 7990 (HTTP), 7999 (SSH)

๐Ÿ“ฆ IV. Installing Bitbucket on Linux

yum install wget -y
wget <bitbucket_download_url>
chmod a+x atlassian-bitbucket-*.bin
./atlassian-bitbucket-*.bin

Access via http://<your_static_ip>:7990

๐Ÿงช V. Initial Bitbucket Configuration

  • Enter your license key (from Atlassian)
  • Set admin account and enable /signup route if required

๐Ÿ“‚ VI. Projects & Repositories

Project: Logical group (e.g., DevSecOps)
Repo: Git repository (e.g., roboshop-app)

git clone http://<your_ip>:7990/scm/devsecops/roboshop-app.git

๐Ÿ”„ VII. Git Basics Recap – Bitbucket Style

git status
git add index.html
git commit -m "Added homepage"
git push origin dev

SHA IDs identify each commit (40 chars)

Branching

git checkout -b feature-login dev
git checkout dev
git push origin feature-login

๐ŸŒณ VIII. Git Flow: Real-World Branching

Long-Lived Branches:
- master (production)
- development (integration)

BranchSourceTarget(s)Purpose
featuredevelopmentdevelopmentNew features
releasedevelopmentmaster, devPrepare release
hotfixmastermaster, devUrgent fixes

๐Ÿ‘ฅ IX. Pull Requests (PRs)

"You don’t push to master. You request to merge."
  1. Finish feature branch
  2. Create PR to dev or master
  3. Peer review
  4. Merge if approved

๐Ÿชถ X. DevSecOps Takeaways

  • Hands-on is key to learning Git
  • Use Git IDs for tracking
  • Branch hygiene = fewer conflicts
  • Secure repo with static IP + firewall
  • PRs = quality + review + discipline

๐Ÿš€ What’s Next?

We'll explore rebase, fast-forward merge, and trunk-based development to modernize our workflow.

© 2025 Kalyan Kalavena — All rights reserved

Patent: Authored and Registered by Kalyan Kalavena

Comments