⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽

Git Merging, Branches and User Access

Computer Programming C++ / Functions

Occasionally while working on a program or website, someone on your team will make changes to the source code. When you go to push your code up to the server. You will get an error, called a Merge Conflict. This video will show you how to handle this, making sure that nobody's code is overwritten.

Creating a branch (or multiple branches) is usefull when you want to do some refactoring or are looking to add new features to a project, but you don't want to risk messing up the team's working version.

For reference, here are the commands used:

  • git fetch - Get the branch (and commit, etc) information from the server.
  • git checkout <branch name> - Switch to a different branch.

Now that you know how to merge and use branching, let's look at how to merge a branch back into the master.

There is also a similar "rebase" command that is usefull, but beyond the scope of our class. Atlassian (the Parent of Bitbucket) has a really great tutorial on Merging vs. Rebasing.

Granting User Access

By now I've surely said, "if you're working with a team..." at least ten times. In this video, I'll show you how to add team-members to your repository in Bitbucket.

Review Questions

The following are examples of questions similar to what you can expect to see on the next exam.

Hover over a question to show the answer.
  1. What is a merge conflict? When you have local changes and server changes that conflict.
  2. What does git checkout do? Switches the current working branch.
⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽
© Ryan Appel