I can't really ever think of a time when I would use git merge
rather than git rebase
and not want to have a commit show up. Is there any way to configure git to have fast forwarding off by default? The fact that there's an --ff
option would seem to imply that there's a way, but I can't seem to find it in the documentation.
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Yes, there is
--no-ff
. You can configure merge options per branch, e.g.adds the following to your
$(REPO)/.git/config
file:Footnote: speaking of my experience, I eventually found switching fast-forward to off was mostly helpful for git newcomers - however once the feel for workflows and concepts start to sink in you definitely want to avoid blurring your log graph with tons of pointless 'merged remote ..blarf' type commits.
It seems there is still a pending question in the thread: How to do it globally (i.e. for all branches) ? For the records, we can use the following:
...to make it apply to all branches in the current repository. To make it apply to all branches in all repositories where someone has not run it without the
--global
option (local settings override global) run this:From the documentation:
Reading the thread of answers I ended up using the following two options
Only loosely related I've also found this setting avoids trouble during pull