Git Beyond the Clouds: How Code Travels, Collaborates & Secures Itself Part 3
๐ง 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)
Branch | Source | Target(s) | Purpose |
---|---|---|---|
feature | development | development | New features |
release | development | master, dev | Prepare release |
hotfix | master | master, dev | Urgent fixes |
๐ฅ IX. Pull Requests (PRs)
"You don’t push to master. You request to merge."
- Finish feature branch
- Create PR to dev or master
- Peer review
- 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.
Comments
Post a Comment