Skip to content

Instantly share code, notes, and snippets.

@joanroig
Created July 11, 2025 09:16
Show Gist options
  • Select an option

  • Save joanroig/589d3a424c7a1e48da4f392c7bdcffae to your computer and use it in GitHub Desktop.

Select an option

Save joanroig/589d3a424c7a1e48da4f392c7bdcffae to your computer and use it in GitHub Desktop.

Getting Started with Python: Setup, Git, VSCode & First Steps

A Step-by-Step Guide to Setup, Tools, GitHub, and Your First Project.

  1. Install Python

    • Download and install the latest version from python.org.
    • During installation, make sure to check “Add Python to PATH”.
    • Verify installation:
       python --version
  2. Install Git and Git Client Options

    • Option A: Git via Command Line
      • Install from git-scm.com.
      • Verify installation:
         git --version
      • Configure your Git identity:
         git config --global user.name "Your Name"
         git config --global user.email "[email protected]"
    • Option B: Git in VSCode
      • After installing Git, open your project in VSCode.
      • Use the Source Control panel to stage, commit, and push code.
    • Option C: Git with SourceTree (GUI)
      • Download from sourcetreeapp.com.
      • Connect your GitHub account and manage repositories with an intuitive UI.
  3. Install VSCode and Essential Extensions

    • Download Visual Studio Code.
    • Install these recommended extensions:
      • Python (by Microsoft)
      • Pylance
      • GitHub Copilot (limited free usage, ChatGPT can be an alternative)
      • Markdown All in One (for Markdown previews and shortcuts)
  4. Create & Clone a GitHub Repository

    • Go to GitHub and create a new repository.
    • Clone the repository using:
      • Command Line:
         git clone https://github.com/username/my-python-project.git
         cd my-python-project
      • VSCode: Use Clone Repository from the Command Palette.
      • SourceTree: Use the Clone/New button.
    • Create a new file hello.py:
       print("Hello, Python world!")
    • Create a .gitignore file (exclude folders like __pycache__/, .vscode/, .env).
    • Create a README.md file to describe your project using Markdown.
  5. Make Your First Commit

    • Use Conventional Commits for clear commit messages.
      • Example:
         feat: add hello world script and README
        
    • Command Line:
       git add hello.py .gitignore README.md
       git commit -m "feat: add hello world script, gitignore, and README"
       git push origin main
    • VSCode:
      • Stage files in the Source Control panel.
      • Enter a message using Conventional Commits format.
      • Commit and push via the UI.
    • SourceTree:
      • Stage, commit, and push with GUI buttons.
    • Verify the commit on GitHub.
  6. Learn Python Interactively

  7. Additional Tips

    • Use GitHub Copilot for AI-powered code suggestions and to ask questions (free quota is limited).
    • Keep a tidy README.md in each repo to document your project.
    • Use Markdown All in One in VSCode to preview documentation.
    • Stick to Conventional Commits for meaningful version history.
    • Push your code regularly and keep your repository up to date.
  8. Practice: Build a Small Project

    • Once you’ve learned about:
      • variables, types, loops, conditions, functions, and basic data structures
    • Choose a small project idea to apply what you’ve learned.
      • Examples:
        • A number guessing game
        • A todo list in the console
        • A temperature unit converter
    • This reinforces learning and builds coding confidence.
    • Push your project to GitHub and share it as a milestone!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment