Merge the topic branch into the main branch and push the changes to the GitHub repo

Run the gloga command.

Note the positions of the local and remote branches. The dog-scaffold and the origin/dog-scaffold branches point to the same commit, and similarly, the main and origin/main branches also point at the same commit. Furthermore, the main branches are behind the dog-scaffold branches in the version history.

Switch to the main branch:

git switch main

Merge the topic branch into the main branch:

git merge dog-scaffold

Note that a fast-forward merge results from this command.

Run the gloga command.

Note that the local branch main has now caught up to the dog-scaffold branches; however, the remote branch origin/main is behind the other branches, because the results of the merge have not yet been pushed to the GitHub repo.

Refresh the GitHub repo home page, and inspect the main branch folder app/models/.

Note that the dog.md is NOT present, further confirming that the changes to the local branch main have not yet been pushed.

Push the changes to the main branch to the GitHub repo:

git push

Run the gloga command.

Note that the remote branch origin/main has now caught up to the other branches.

Refresh the GitHub repo home page, and inspect the main branch folder app/models/.

Note that the dog.md is now present, confirming that the changes to the local branch main were pushed successfully.


⏴ Back Next ⏵