---
title: Q&A
tags: ["Q&A"]
---

# Q&A

## Q1

What is the default branch name?

## A1

The default branch name is `master`. You can change it to any name you like. For
example, you can change it to `main` by following the steps below:

```
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```

## Q2

What is the defference between `git branch` and `git branch -a`?

## A2

`git branch` shows only local branches, while `git branch -a` shows both local
and remote branches.

## Q3

Fast-forward merge is not possible. How can I merge the feature branch into the
main branch?

## A3

You can use `--no-ff` option to force a merge commit even if the merge is a
fast-forward.
