GitHub
GitHub will be your primary tool for version control, collaboration, and showcasing your AI Academy project. This guide covers everything you need to know to use GitHub effectively throughout the fellowship.
Create Your Repository
# Create a new directory for your project
git clone project_url
cd my-ai-project
# Create README file
echo "# My AI Academy Project" > README.md
# Add and commit initial files
git add README.md
git commit -m "Initial commit: Add README"
# Create repository on GitHub (use GitHub web interface)
git push origin main
Core commands
# Check status of your files
git status
# Add files to staging
git add filename.py
git add . # Add all files
# Commit changes
git commit -m "Add new feature: sentiment analysis"
# Push to GitHub
git push
git push origin main
# Pull latest changes
git pull
git pull origin main
Branching
# Create a new branch for your code
git checkout -b feature/my-thing
git push -u origin feature/my-thing
# Work on your feature, then add and commit
git add .
git commit -m "Implement user interface components"
# Push feature branch to GitHub
git push origin feature/user-interface
# Then create your PR
README Best Practices
To ensure everyone know what your project is about, it is helpful to create a README. A README could include something like the following: