squash

git subtree push --squash does not squash

半城伤御伤魂 提交于 2019-12-10 03:49:03
问题 I am using git subtree to organize my git repositories. Let's say I have a main repository called repo and a library called lib . I successfully "imported" the lib repository by squashing its history. I would now like to contribute back to lib by squashing the history too. This does not seem to work: I specify the --squash option to git subtree push but when looking at the history I still send all the commits. How to reproduce Here is a script showing the minimal commands needed to reproduce

Github “Squash and Merge” - subsequent pull request showing all previous changes

本小妞迷上赌 提交于 2019-12-09 16:11:31
问题 I have a branch which I pulled from master branch. Let's call it integration. In the integration branch, I made various commits (C1, C2, C3). When I am done, I made a Pull Request to the master branch. From the master branch, I did a "Squash and Merge" so it results in only a single commit in the master. This all seems great. But then later, I made some additional changes to the integration branch and when I make a pull request again, I am seeing all the commit comments of previous changes

Git: How to convert an existing `merge` to a `merge --squash`?

牧云@^-^@ 提交于 2019-12-06 10:04:42
I performed multiple merge commits but they should have been merge --squash instead. The conflict resolution took more than a day so I can't afford to redo the merging by hand. Is there a way to convert the merge to merge --squash ? It's worth noting here that git merge and git merge --squash are closely related, but git merge --squash does not create a merge . The phrasing here is very important, particularly the article "a" in front of "merge": "a merge" is a noun, while "to merge" is a verb. Both commands perform the act of merging. The difference lies in how the result is saved . It's also

How to git merge squash in Eclipse

冷暖自知 提交于 2019-12-06 05:22:09
问题 Sometimes I need to merge squash from Eclipse. I know I can do it in command line, but it will be really useful to have graphic option integrated in Eclipse. Do you know how to do it? 回答1: You can start an interactive rebase in EGit , and select squash for the commits you want squashed. Note: for squashing the last few commits, historically the other way was a soft reset (see this thread) select in history the first commit which I don't want to squash right-click and say " Team->Reset->Soft "

How to git merge squash in Eclipse

浪尽此生 提交于 2019-12-04 11:01:57
Sometimes I need to merge squash from Eclipse. I know I can do it in command line, but it will be really useful to have graphic option integrated in Eclipse. Do you know how to do it? You can start an interactive rebase in EGit , and select squash for the commits you want squashed. Note: for squashing the last few commits, historically the other way was a soft reset (see this thread ) select in history the first commit which I don't want to squash right-click and say " Team->Reset->Soft " right-click and say " Commit ". This commit will contain all the changes of the last m commits together

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: How to rebase and squash commits from branch to master?

我只是一个虾纸丫 提交于 2019-12-03 05:08:42
问题 I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do: git checkout -b new-feature make a couple of commits, after it I was trying: git rebase -i master in this case commits will remain in new-feature branch git checkout master git rebase -i new-feature It gives me and edit window with noop message. I know about command: git merge --squash new-feature But I'm currently working on learning of rebase command. 回答1: When rebasing, Git will not

Git squash all commits in branch without conflicting

老子叫甜甜 提交于 2019-12-03 02:20:27
问题 A common development workflow for us is to checkout branch b , commit a bunch to it, then squash all those commits into one (still on b ). However, during the rebase -i process to squash all the commits, there are frequently conflicts at multiple steps. I essentially want to alter the branch into one commit that represents the state of the repository at the time of the final commit on b I've done some searching but I haven't found exactly what I'm looking for. I don't want to merge --squash

Git: How to rebase and squash commits from branch to master?

让人想犯罪 __ 提交于 2019-12-02 17:34:35
I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do: git checkout -b new-feature make a couple of commits, after it I was trying: git rebase -i master in this case commits will remain in new-feature branch git checkout master git rebase -i new-feature It gives me and edit window with noop message. I know about command: git merge --squash new-feature But I'm currently working on learning of rebase command. When rebasing, Git will not move commits to another branch. It will move the branch including all its commits. If you want to get the

Git squash all commits in branch without conflicting

感情迁移 提交于 2019-12-02 15:51:42
A common development workflow for us is to checkout branch b , commit a bunch to it, then squash all those commits into one (still on b ). However, during the rebase -i process to squash all the commits, there are frequently conflicts at multiple steps. I essentially want to alter the branch into one commit that represents the state of the repository at the time of the final commit on b I've done some searching but I haven't found exactly what I'm looking for. I don't want to merge --squash because we would like to test the squashed feature branch before merging. Rasmus Østergaard Kjær Voss If