Backlog uses cookies to deliver our services. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.

For this tutorial step, we have prepared a repository with some ready made commits to speed things up.

You can download the repository here.

Go to the downloaded "stepup-tutorial/tutorial7" directory and examine the history of this repository. It should look like the following.

In this step, we are going to squash commits from the "issue1" branch to a single commit and merge it into the master branch.

Current history

Switch over to the master branch. Execute a merge with the option --squash like below.

$ git checkout master Switched to branch 'master' $ git merge --squash issue1 Auto-merging sample.txt CONFLICT (content): Merge conflict in sample.txt Squash commit -- not updating HEAD Automatic merge failed; fix conflicts and then commit the result.

It looks like Git has detected a conflict. Let's manually resolve that in sample.txt and proceed with committing the change.

$ git add sample.txt $ git commit [master 0d744a7] Conflicts: sample.txt 1 files changed, 4 insertions(+), 0 deletions(-)

We now have a new commit added to the master branch which includes all of the commits in the "issue1" branch. You can verify the new change in the revision history using the log command.