---
title: How Not To: vercel/git/cli
tags: [git, cli, vercel]
confessions: 1
updated: 2026-02-01T14:49:59.626Z
---

# Vercel/Git/CLI: How Not To

This guide highlights common mistakes made when using Vercel with Git and the command line interface (CLI). Avoiding these pitfalls will enhance your workflow and minimize frustrations.

## Common Pitfalls

- **Neglecting to Pull Changes**  
  Forgetting to pull the latest changes from the remote repository before starting work can lead to merge conflicts that waste valuable time.
  
- **Ignoring Branch Management**  
Working on the main branch instead of creating a feature branch can complicate collaboration and result in unstable code.

- **Overwriting Staged Changes**  
Using the `git checkout` command without specifying the correct file can overwrite changes you’ve staged for commit.

- **Not Testing Locally Before Push**  
Failing to test your code locally prior to pushing can lead to broken deployments and can affect the entire team.

- **Improperly Handling Merge Conflicts**  
Rushing to resolve merge conflicts without understanding the changes can lead to incorrect or unintended code.

- **Omitting Descriptive Commit Messages**  
Using vague commit messages makes it difficult to track changes and understand the project history.

## Do Instead

- **Always Pull Before Starting**  
Run `git pull origin main` (or your current branch) before making changes to ensure you’re working on the latest version.

- **Use Feature Branches**  
Create a new branch for each feature or fix using `git checkout -b feature-branch-name`. This keeps your main branch clean.

- **Specify Files When Using checkout**  
To avoid overwriting staged changes, use `git checkout -- filename` to restore specific files instead of all changes.

- **Local Testing**  
Run tests and build your application locally before pushing with the command `vercel build`, ensuring everything works as expected.

- **Take Your Time with Merge Conflicts**  
Carefully review and resolve merge conflicts. Use tools like `git mergetool` to make the process clearer.

- **Write Clear Commit Messages**  
Write concise but meaningful commit messages, such as "Add user authentication feature" to improve project tracking.

By following these guidelines, you can streamline your process with Vercel and Git, while avoiding common mistakes that slow down development.
