Skip to content

Latest commit

 

History

History
172 lines (123 loc) · 7.63 KB

git-gui-tutorial.md

File metadata and controls

172 lines (123 loc) · 7.63 KB

Simple Git Tutorial (GUI — GitHub Desktop for Windows & macOS)

A beginner-friendly guide to version control on both Windows and macOS without typing terminal commands. All you need to do is click buttons!


Table of Contents


Part 1: Setup & Platform Installation (Windows & macOS)

1. Create a Free GitHub Account

  1. Open your browser and navigate to github.com.
  2. Click Sign up and fill in your email, password, and chosen username.
  3. Verify your email address.

GitHub Account Sign Up


2. Download and Install GitHub Desktop

GitHub Desktop Download

🪟 Windows Setup

  1. Navigate to desktop.github.com and click Download for Windows (64-bit).
  2. Run GitHubDesktopSetup.exe.
  3. The app will install automatically and add shortcuts to your desktop and Start Menu.
  4. File Explorer Integration: You can right-click any project folder in Windows File Explorer and choose Open in GitHub Desktop.

🍎 macOS Setup

  1. Navigate to desktop.github.com and click Download for macOS.
  2. Unzip GitHubDesktop-universal.zip and drag GitHub Desktop.app into your /Applications folder.
  3. Open GitHub Desktop from Launchpad or Spotlight (Cmd + Space). If prompted with a macOS security dialog ("Downloaded from the Internet"), click Open.
  4. Finder Integration: Easily drag project folders directly onto the GitHub Desktop window to open them.

3. Sign In & Set Default Author Identity

  1. Click Sign in to GitHub.com.
  2. Your web browser will open requesting authorization. Click Authorize desktop.
  3. Configure your Git Author info:
    • On Windows: Go to File → Options → Git.
    • On macOS: Go to GitHub Desktop → Settings... → Git (or press Cmd + ,).
    • Enter your Name and Email (use the same email registered with your GitHub account).

Part 2: Creating a Repository

A Repository (or repo) is a folder where Git monitors and tracks the history of all files.

Method A: Create a New Project Repository (Recommended)

  1. Navigate to:
    • Windows: File → New Repository... (Ctrl + N)
    • macOS: File → New Repository... (Cmd + N)
  2. Fill out the dialog:
    • Name: Your project name (e.g. my-awesome-project).
    • Local Path:
      • Windows: e.g. C:\Users\YourName\Documents\GitHub
      • macOS: e.g. /Users/YourName/Documents/GitHub
    • (Optional) Check Initialize this repository with a README.
  3. Click Create Repository.
  4. Click the Publish repository button in the top toolbar to back up your repository to GitHub.com.

Create a New Repository Dialog

Method B: Add an Existing Folder

  1. Click File → Add Local Repository... (Ctrl + O on Windows / Cmd + O on macOS).
  2. Choose your existing project folder.
  3. If GitHub Desktop alerts you that "This directory does not appear to be a Git repository", click create a repository to initialize it.
  4. Click Publish repository to sync it to the cloud.

Tip

If you want your code to remain private, ensure the Keep this code private checkbox is checked when publishing.


Part 3: Saving Changes (Daily Workflow)

Whenever you make progress on your project (writing code, designing 3D assets, updating documents), follow this save cycle:

Step 1 — Edit Your Files

Work normally in your favorite tools (Visual Studio Code, Unity, Blender, Photoshop, Word, etc.). Save files as usual.

Step 2 — Review Changes in GitHub Desktop

  • Switch to GitHub Desktop.
  • In the left sidebar under the Changes tab, you will see a list of modified, added, or deleted files.
  • Select or deselect checkboxes to pick which files to include (default is all).

Step 3 — Commit (Create a Snapshot)

  • In the bottom-left corner, enter a short, descriptive summary in the title field:
    • Good examples: Add Level 2 map, Fix player jump physics, Update header navigation.
  • Click the green button: Commit to main.

Step 4 — Push (Upload to GitHub Cloud)

  • Click the Push origin button in the top toolbar.

Changes, Commit and Push in GitHub Desktop

Note

Commit saves a version locally on your machine. Push sends that version to GitHub so your team can access it and your work is safely backed up in the cloud.


Part 4: Syncing & Pulling Updates

When collaborating with team members who also push changes, you should update your local copy before starting work:

  1. Open GitHub Desktop and click Fetch origin in the top bar.
  2. If new commits exist on GitHub, the button will change to Pull origin.
  3. Click Pull origin to download and merge the latest work.

Important

Golden Rule of Collaboration:

  • Before you start working: Click Pull to grab the latest code.
  • After you finish working: Commit and then Push.

Part 5: Browsing History & Reverting

  • Click the History tab (next to Changes).
  • You will see a chronological log of all commits created by you and your teammates.
  • Click any commit to see exactly which lines were added (+ green) or removed (- red).
  • To undo an older commit: Right-click on it and select Revert this commit (this creates a new commit that safely reverses those changes).

History Tab in GitHub Desktop


Daily 4-Step Summary

Memorize these four steps for your daily routine:

  1. Pull — Fetch the latest updates from your team.
  2. Work — Modify files, write code, and build your project.
  3. Commit — Check changed files, type a descriptive message, and commit.
  4. Push — Upload your commits to GitHub.

Keyboard Shortcuts: Windows vs macOS

Speed up your GitHub Desktop workflow with native shortcuts:

Action Windows Shortcut macOS Shortcut
New Repository Ctrl + N Cmd + N
Add Local Repository Ctrl + O Cmd + O
Clone Repository Ctrl + Shift + O Cmd + Shift + O
Push / Pull (Fetch) Ctrl + P Cmd + P
Open in External Editor Ctrl + Shift + A Cmd + Shift + A
Show in File Explorer / Finder Ctrl + Shift + F Cmd + Shift + F
Preferences / Settings Ctrl + , Cmd + ,

Pro-Tips for Beginners

  • Quickly inspect files: Right-click any file in the Changes list and choose Show in Explorer (Windows) or Reveal in Finder (macOS) to locate it on your disk.
  • Write clear commit summaries: A message like Fix login validation error helps future-you much more than Update file or asdasd.
  • Commit frequently: Don't wait until Friday afternoon to commit a whole week's work. Make small, focused commits often.
  • Handling Large files: Video files, 3D assets, and huge game assets over 100MB should be tracked via Git LFS (Large File Storage). GitHub Desktop will alert you if an asset exceeds size limits.