# Branching

```
git branch // show all branch
git branch -v // branches with some more details
```

## Create Branch

```
git branch myBranch ( create branch )
git checkout myBranch ( switch to myBranch )

// OR
git checkout -b myBranch ( create & switch to that branch )
```

## Branch merging

Go to the branch in which you want to merge another branch

```
// in dev branch & want to merge dev branch to master
git checkout master
git merge dev ( if master have no change , than all is well, else their may be conflict)
```

## Have conflict

```
git status ( show all files in red that have conflict )
git diff mydir/abc.txt ( show difference in command line )

// OR open file and resolve conflict manually
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hemantajax-2.gitbook.io/git-basics/branching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
