Step 1: Install GitHub Desktop
Before you begin, make sure your system meets the minimum requirements:
- Operating System: Windows 10 or later, macOS 10.13 or later
- Internet connection
- Administrator or sudo privileges for installation
Visit the official download page and install:
- Go to https://desktop.github.com/
- Click the “Download for Windows” or “Download for macOS” button
- Once downloaded, run the installer and follow the on-screen instructions
Step 2: Configure Your Git Identity
Before making commits, set your name and email so GitHub can associate your contributions with your account. Open a terminal from GitHub Desktop (Repository → Open in Terminal) and run:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Step 3: Sign In to Your GitHub Account
- Launch GitHub Desktop
- If prompted, click “Sign in to GitHub.com”
- Authorize GitHub Desktop to access your account
- Verify your account appears in the top-left corner under “Current User”
Step 4: Clone an Existing Repository
Cloning copies a repository from GitHub to your local machine:
- In GitHub Desktop, go to File → Clone Repository
- Select the “GitHub.com” tab to see your repositories
- Choose a repository and click “Clone”
- The repo will appear under “Current Repository” and files on your local drive
Step 5: Create a New Repository
Start a project from scratch:
- In GitHub Desktop, go to File → New Repository
- Enter a Name, Description (optional), and Local Path
- Choose a Git Ignore template (e.g., “Node”) and a License if needed
- Click “Create repository”
- Optionally, click “Publish repository” to push it to GitHub.com
Step 6: Make Changes and Commit
Workflow for tracking changes:
- Open the repository folder in your preferred code editor
- Edit files or add new ones
- Return to GitHub Desktop; unstaged changes appear in the “Changes” tab
- Enter a clear commit message in the summary field
- Click “Commit to main” (or the current branch name)
Step 7: Push Your Commits to GitHub.com
Keep the remote repo up to date:
- After committing, click the “Push origin” button in the top toolbar
- This uploads your local commits to the remote repository
- Verify the changes on GitHub.com by visiting the repo’s page
Step 8: Pull Updates from the Remote Repository
In case others have pushed changes:
- Click the “Fetch origin” button to check for new commits
- If updates exist, “Pull origin” will appear—click it to sync your local copy
- Resolve any merge conflicts if prompted (see next step)
Step 9: Create and Manage Branches
Use branches to develop features safely:
- Click the current branch dropdown in the top toolbar
- Select “New Branch”
- Name your branch (e.g., “feature/login-form”) and click “Create Branch”
- Work on the branch, commit, then push it the same way
- Switch branches anytime using the branch menu
Step 10: Handle Merge Conflicts
When local and remote changes overlap:
- GitHub Desktop will flag conflicted files after a pull
- Click “Open in Editor” for each conflicted file
- Manually resolve conflicts by choosing which code to keep
- Save the file, return to GitHub Desktop, then mark as resolved
- Commit the merge and push the result
Step 11: Create a Pull Request
Contribute your branch back to the main project:
- In GitHub Desktop, switch to the branch you want to merge
- Click “Create Pull Request” in the top toolbar
- This opens GitHub.com in your browser with a pre-filled PR form
- Review, add reviewers, then click “Create pull request”
Step 12: View History and Undo Changes
Inspect past commits or revert mistakes:
- Go to the “History” tab in GitHub Desktop
- Click any commit to see changed files and diffs
- To undo a commit, right-click it and select “Revert This Commit”
- Follow prompts to commit the reversal
Now you’ve mastered the core GitHub Desktop workflow—installing, configuring, cloning, creating, committing, collaborating, and resolving conflicts—all through a friendly graphical interface. Happy coding!