

That’s entirely fine, but if one of them wanted to branch off of your branch, when you eventually rebase, you end up with this: Let’s say you created the feature branch, and push it to your repo so your coworkers can test it out. Remember how rebasing copies commits and leaves a stranded playhead? That’s actually a major issue if you’re working with shared code.

And if you’d still like to continue working on your branch, you still need to “merge” in changes. The actual merge command at the end should go off without a hitch though, since the process of rebasing requires you to “merge” in changes, which still can cause conflicts.
#REBASE WITH MASTER GIT UPDATE#
So rebasing doesn’t end up solving the problem of dealing with merges, since you’ll need to merge at the end anyway to update the master branch. Which would look like this, with master’s playhead replacing the feature playhead: The master branch is left untouched, and is free to continue receiving commits. The whole branch is lifted up, and transported to the end of the current master branch, where it connects to the end. Rebasing changes where you started your branch. Rebasing tries to solve these issues, to varying degrees of success.
#REBASE WITH MASTER GIT CODE#
This method of merging code presents three problems: The git merge command moves the master playhead to the new merge commit, and deletes the feature playhead, as it’s no longer necessary. This creates a new merge commit, and if there are any conflicts, you’ll have to solve them manually.

If you wanted to merge feature into master, you would run: git checkout master In this way, you can think of them like the playhead on a record player you put the branch head at a specific position, and it works its way back through the chain, “playing” your code and arriving at a final version. Whenever you commit, your local git client will automatically move the playhead forward to the new commit. Git only stores one thing when dealing with branches: the ID of the commit at the end of the branch.
