File: git-merge-into.md

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (59 lines) | stat: -rw-r--r-- 1,541 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
git-merge-into(1) -- Merge one branch into another
=================================

## SYNOPSIS

`git merge-into` [src] <dest> [--ff-only]

## DESCRIPTION

Merge one branch into another, and keep yourself on current branch. If src branch not given, it will merge current one to dest.

## OPTIONS
  
  <src>

  The name of the branch will be merged into. If this not given, use current branch as default.

  <dest>

  The name of the branch to merge into.

  --ff-only

  Refuse to merge and exit with a non-zero status unless the current HEAD is
  already up-to-date or the merge can be resolved as a fast-forward.


## EXAMPLES

Assume the following history exists and the current branch is src:

                     A---B---C src(current)
                    /
               D---E---F---G dest

After running `git merge-into dest`, it will look like this:

                    A---B---C src(current)
                    /         \
               D---E---F---G---H dest

The `H` commit will record the merge result, just like what `git merge` does.
And `src` is still the current branch.

The default implementation of `merge-into` use `git checkout` and `git merge`, 
which may cause temporary change in the working tree. If you make sure your 
branch can be merged fast-forward, add `--ff-only` to avoid files change.

## AUTHOR

Written by spacewander &lt;<spacewanderlzx@gmail.com>&gt;

## REPORTING BUGS

&lt;<https://github.com/tj/git-extras/issues>&gt;

## SEE ALSO

&lt;<https://github.com/tj/git-extras>&gt;