snippets/old_snippets/git-nocommit-merge.en.md

21 lines
796 B
Markdown

---
title: "soft merge"
date: 2020-01-11T05:05:05+01:00
draft: false
snippet_types: ["git"]
---
```shell
$ git merge feature/tickets/NUTS-1231 --no-commit --no-ff
```
Sometimes you need to merge but only parcial files and you want fine control over everything and and
possibly want to manually merge parts of files. This is when I use **--no-commit --no-ff**, ff for
fast forward, it basically stages the entire merge making it easy to go trough and make changes.
Using magit in spacemacs I go through hitting 'u' on files I don't want unstaging them, then maybe
'e' on a file to edit it via ediff, combining the new changes with orginal file seamlessy. Overall a
fun and impowering workflow!
source:
[stackoverflow](https://stackoverflow.com/questions/8640887/git-merge-without-auto-commit)