Prerequisites
- A workspace with a connected git repository.
- A project open in the Code IDE.
- Git Advanced selected in your IDE preferences.
Steps
1
Create or switch branches
Click the branch name in the bottom-left of your screen, select Create a new branch from the menu, enter the new branch name, then press Enter to create it.
Make sure to publish the new branch to remote after creating it.
2
Stage your changes
Before committing, select which files to stage. This is the equivalent of the
git add command. You can stage all changed files or selectively choose the files to include in your next commit.3
Commit and push your changes
Once your changes are staged, enter a commit message and click the commit button at the top of the Git Advanced panel or from the More options context menu. Then push your changes to remote.
4
Open a pull request
After your commits are pushed, use the Open Pull Request option to go directly to your git provider interface and open a PR for review.
You will know it worked when your staged commit appears on your remote branch and the pull request opens in your git provider. If a file you expected is missing from the commit, it was not staged, so stage it and commit again.
Next steps
Resolve merge conflicts
Handle conflicts when Git can’t merge two branches automatically.
Delete branches
Prune merged branches or delete specific branches individually.
Use GitLens
Explore file history, blame, and authorship in the IDE.
Git Advanced reference
Every Git Advanced panel option and setting.