Skip to main content

Git & Version Control

Welcome to the Git documentation for the NetSuite development team. This section covers everything you need to know about using Git with VS Code for effective team collaboration.

What This Section Covers

User Guide

  • Git User Guide - Complete VS Code Git interface guide for beginners
  • Step-by-step workflows for common tasks
  • Understanding branches, commits, and pull requests

Commands Reference

  • Git Commands Reference - Complete command reference with VS Code equivalents
  • Terminal commands for every scenario
  • Quick reference cards

Workflows

  • Git Workflows - Branching strategies and team workflows
  • Feature development process
  • Bug fix and hotfix procedures
  • Code review process

Troubleshooting

  • Git Troubleshooting - Common problems and solutions
  • Authentication issues
  • Merge conflict resolution
  • Recovery from mistakes

Branch Strategy Overview

Our team uses the following branch structure:

main ─────────────────────────────────────────────────────► Production
│ ▲
│ │ (hotfix)
▼ │
develop ──────────────────────────────────────────────────────► Integration
│ ▲ ▲
│ │ │
│ feature/NS-123-new-feature ──────────┘ │
│ │
│ bugfix/NS-456-fix-issue ────────────────────────┘

Branch Types

BranchPurposeRule
mainProduction code - what's live in NetSuiteNEVER push directly
developIntegration testing - combines everyone's workMerge via Pull Request only
feature/*Your working branches for new featuresCreate from develop, merge back to develop
bugfix/*Your working branches for bug fixesCreate from develop, merge back to develop
hotfix/*Emergency production fixesCreate from main, merge to main AND develop

Quick Start

First Time Setup

  1. Install Git - Download from git-scm.com
  2. Configure your identity:
    git config --global user.name "Your Full Name"
    git config --global user.email "your.email@company.com"
  3. Clone the repository - See User Guide for detailed steps

Daily Workflow

# Start of day - get latest code
git checkout develop
git pull origin develop

# Create your feature branch
git checkout -b feature/vendor-NS123-description

# Work, commit, push
git add .
git commit -m "[NS-123] Your change description"
git push -u origin feature/vendor-NS123-description

# Create Pull Request on GitHub

Golden Rules

  1. NEVER push directly to main or develop
  2. ALWAYS pull before starting new work
  3. ALWAYS create a branch for your changes
  4. Commit often with meaningful messages
  5. Push your branch daily (backup!)
  6. When in doubt, ASK before acting!

Need Help?