File size: 1,233 Bytes
dcc24f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# ============================================
# Setup Git Branches
# Creates feature, dev, main branch structure
# ============================================

PROJECT_DIR="$HOME/llm-mail-trainer"
cd "$PROJECT_DIR" || exit 1

echo "πŸ”§ Setting up branch structure..."

# Ensure we're on main
git checkout main 2>/dev/null || git checkout -b main

# Create dev branch from main
git branch -D dev 2>/dev/null
git checkout -b dev
echo "βœ… Created 'dev' branch"

# Create feature branch from dev
git branch -D feature/improvements 2>/dev/null
git checkout -b feature/improvements
echo "βœ… Created 'feature/improvements' branch"

# Push all branches to remote
echo ""
echo "πŸš€ Pushing branches to HuggingFace..."
git push hf main --force 2>/dev/null
git push hf dev --force 2>/dev/null
git push hf feature/improvements --force 2>/dev/null

echo ""
echo "πŸ“‹ Branch structure:"
git branch -a

echo ""
echo "βœ… Branch setup complete!"
echo ""
echo "Branch workflow:"
echo "  feature/* β†’ dev β†’ main"
echo ""
echo "Commands:"
echo "  git checkout feature/improvements  # Work on features"
echo "  git checkout dev                   # Merge features here"
echo "  git checkout main                  # Production code"