Catalog / Azure Repos Cheat Sheet
Azure Repos Cheat Sheet
A quick reference guide to Azure Repos, covering essential commands and concepts for version control.
Getting Started with Azure Repos
Setting Up Your Environment
Creating a New Repository:
|
Cloning an Existing Repository:
|
Connecting with SSH:
|
Basic Git Commands
|
Initialize a new Git repository. |
|
Clone a repository from a remote URL. |
|
Add a file to the staging area. |
|
Commit changes with a descriptive message. |
|
Push changes to a remote branch. |
|
Pull changes from a remote branch. |
Branching and Merging
Branch Management
|
Create a new branch. |
|
Switch to an existing branch. |
|
Delete a branch locally (if merged). |
|
Delete a branch remotely. |
|
List all branches (local and remote). |
|
Create a new local branch and track a remote branch. |
Merging Strategies
Basic Merge:
|
Merge with Pull Request (Recommended):
|
Resolving Merge Conflicts:
|
Working with Remote Repositories
Managing Remotes
|
List configured remote connections. |
|
Add a new remote connection. |
|
Remove a remote connection. |
|
Rename a remote connection. |
|
Fetch branches and/or tags (plus associated objects) from another repository. |
|
Fetch updates from all remotes. |
Pull Requests in Azure Repos
Creating a Pull Request:
|
Reviewing a Pull Request:
|
Completing a Pull Request:
|
Advanced Features
Stashing Changes
|
Stash your uncommitted changes. |
|
Stash changes with a message. |
|
List all stashed changes. |
|
Apply the latest stashed changes. |
|
Apply a specific stashed change (e.g., |
|
Delete a specific stashed change. |
Ignoring Files
Use a Example
|
Common
|
To ignore a file that has already been committed, you must first remove it from the index:
|