Push Changes to ADO
Now that you have committed changes locally, you can push our updated branch and sync it back up to ADO Repos.
git push
Unable to push your branch?
There are two common problems with pushing changes from local back to ADO.
1. You did not checkout your branch, but are working on main. The main
branch is locked down so that changes cannot be pushed directly to main, but rather to a branch and integrated to main through a pull request. If you committed to main, you can simply create a new branch off main and push the new branch to ADO (of course, you will need to reconcile your local copy of main later).
git checkout -b your-new-branch
git push
2. Your local branch is not tracking the remote branch. Remember that we are working with two separate Git repos - remote and local. If you created the branch locally (instead of pulling the branch from ADO), then your local branch will not map to the remote branch automatically. To resolve this, you will need to publish your branch and set the upstream. Git will provide you a response with the proper command to continue pushing your branch to the remote.