From the course: Learning Bitbucket

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Push code to a branch

Push code to a branch - Bitbucket Tutorial

From the course: Learning Bitbucket

Push code to a branch

- [Instructor] We've seen how we can create a branch in the Bitbucket Web UI. Now let's check out a branch to our local system and push code back to the same branch on Bitbucket. When we're working with branches locally, we'll start by running Git Pull, this downloads any remote changes to the local repository on the main branch. Then we'll run the get checkout Command. Checkout is used to switch between branches. Most importantly, git checkout updates our working directory to track changes in the selected branch. This means any commits that we create will be added to the branch we're currently working on. If we've checked out multiple branches, we can use the git branch command to list all the branches that are available on the system. And then we'll use commands from the Git workflow to check status, add and commit the changes we've made and push our local changes back to Bitbucket. Let's start this workflow in the web interface. I'm logged into my Bitbucket account and I'm viewing…

Contents