fast-forward

Aptana: Git merge without fast forward

僤鯓⒐⒋嵵緔 提交于 2019-12-06 16:11:28
how can i disable fast-forward for mergining branches in aptana 3 ? example: create/checkout a branch (foo) commit changes checkout master-branch merge with foo Set it in project repository configuration git config --add merge.ff false I think the nearest you get is to use merge --no-ff . 来源: https://stackoverflow.com/questions/9159895/aptana-git-merge-without-fast-forward

How do pull no fast-forward in TortoiseGit

一个人想着一个人 提交于 2019-12-06 06:26:47
Since some people recommend no fast-fordward (--no-ff) on merges in Git, I wanted to do that. But I can't see where to check to enable that in the TortoiseGit GUI. Yes, I could do this from the command line. But others in the group won't use it, so I need a GUI solution. EDIT: removed push from question; it is not realistic as pointed out below. The references were to pulls only. Where do you search for it? When selecting TortoiseGit -> Merge menu item I get dialog shown below. I can't believe that you missed "No Fast Forward" check box on it :) For pull there's no such option in TortoiseGit,

git merge with --no-ff and --squash

自作多情 提交于 2019-12-03 13:26:38
I am using the git flow way of managing branches in my repo, as described in: http://nvie.com/posts/a-successful-git-branching-model/ Thus the sequence of commands I should use would be as follows: git checkout mybranch git pull --rebase origin develop git checkout develop git merge --no-ff mybranch However, there is one thing that I would like to do differently, in some cases: I would like to preserve all of my commits on my feature branch ( mybranch ), but have them lumped together (or squashed) into a single diff when merging into develop . So this is what I think the sequence of commands

git rebase master then push origin branch results in non-fast-forward error

匆匆过客 提交于 2019-11-30 14:04:15
I am trying on working on my featureA branch while keeping it up-to-date with the master branch. Here is the scenario git clone ssh://xxx/repo git checkout -b featureA $ git add file.txt $ git commit -m 'adding file' $ git push origin featureA meanwhile a couple new commits where pushed to origin master git checkout master git pull origin master git checkout featureA git rebase master git push origin feature A To ssh://xxx/repo ! [rejected] featureA -> featureA (non-fast-forward) error: failed to push some refs to 'ssh://xxx/repo' To prevent you from losing history, non-fast-forward updates

What are the differences between `--squash` and `--no-ff --no-commit`?

北城余情 提交于 2019-11-29 20:34:04
Which one should one use to hide microcommits? Is the only difference between git merge --squash and git merge --no-ff --no-commit the denial of the other parents? Yasushi Shoji The differences These options exists for separate purposes. Your repository ends up differently. Let's suppose that your repository is like this after you are done developing on the topic branch: --squash If you checkout master and then git merge --squash topic; git commit -m topic , you get this: --no-ff --no-commit Instead, if you do git merge --no-ff --no-commit; git commit -m topic , you get this: Hiding micro

git rebase master then push origin branch results in non-fast-forward error

[亡魂溺海] 提交于 2019-11-29 19:25:41
问题 I am trying on working on my featureA branch while keeping it up-to-date with the master branch. Here is the scenario git clone ssh://xxx/repo git checkout -b featureA $ git add file.txt $ git commit -m 'adding file' $ git push origin featureA meanwhile a couple new commits where pushed to origin master git checkout master git pull origin master git checkout featureA git rebase master git push origin feature A To ssh://xxx/repo ! [rejected] featureA -> featureA (non-fast-forward) error:

How can I fast-forward a single git commit, programmatically?

北战南征 提交于 2019-11-28 23:26:04
问题 I periodically get message from git that look like this: Your branch is behind the tracked remote branch 'local-master/master' by 3 commits, and can be fast-forwarded. I would like to be able to write commands in a shell script that can do the following: How can I tell if my current branch can be fast-forwarded from the remote branch it is tracking? How can I tell how many commits "behind" my branch is? How can I fast-forward by just one commit, so that for example, my local branch would go

What are the differences between `--squash` and `--no-ff --no-commit`?

筅森魡賤 提交于 2019-11-28 16:27:06
问题 Which one should one use to hide microcommits? Is the only difference between git merge --squash and git merge --no-ff --no-commit the denial of the other parents? 回答1: The differences These options exists for separate purposes. Your repository ends up differently. Let's suppose that your repository is like this after you are done developing on the topic branch: --squash If you checkout master and then git merge --squash topic; git commit -m topic , you get this: --no-ff --no-commit Instead,

When to use the '--no-ff' merge option in Git

非 Y 不嫁゛ 提交于 2019-11-28 16:03:43
A Successful Git Branching Model recommends to use --no-ff when merging branches: The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature. […] Yes, it will create a few more (empty) commit objects, but the gain is much bigger that that cost. Unfortunately, I have not found a way to make --no-ff the default behavior of git merge yet, but it really should be. Understanding the

Can I make fast forwarding be off by default in git?

有些话、适合烂在心里 提交于 2019-11-26 16:50:50
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. Yes, there is --no-ff . You can configure merge options per branch, e.g. git config branch.master.mergeoptions "--no-ff" adds the following to your $(REPO)/.git/config file: [branch "master"] mergeoptions = --no-ff Footnote: speaking of my experience, I eventually found