git-squash Questions

2

Solved

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 c...
Stillage asked 14/11, 2016 at 11:25

5

When merging branches with --squash, git does no longer seem to be able to determine whether a branch has been fully merged. How can I quickly check this with existing git commands? To reproduce, ...
Apocrypha asked 12/9, 2019 at 7:38

8

Solved

I am working on a feature branch. Made several commits. Squashed commits. Pushed changes to remote branch. Got conflicts. Merged changes from master, resolved conflicts on feature branch. git fet...
Trisomic asked 9/5, 2015 at 5:53

46

Solved

How do I squash my last N commits together into one commit?
Duckett asked 4/3, 2011 at 4:11

46

Solved

How do I squash my last N commits together into one commit?
Reger asked 4/3, 2011 at 4:11

46

Solved

How do I squash my last N commits together into one commit?
Nunn asked 4/3, 2011 at 4:11

46

Solved

How do I squash my last N commits together into one commit?
Stovall asked 4/3, 2011 at 4:11

46

Solved

How do I squash my last N commits together into one commit?
Heterocyclic asked 4/3, 2011 at 4:11

46

Solved

How do I squash my last N commits together into one commit?
Frizzly asked 4/3, 2011 at 4:11

2

Solved

I have squashed several commits into one commit. One of the commits before the squash included debug prints and a later commit that was squashed together with it removed those prints. Is there any ...
Belsen asked 17/3, 2016 at 10:54

4

I am going to merge my release branch to master and I am wondering if I should squash the commits from develop into a single merge commit when merging into master. General documentations about git...
Patriarchate asked 14/12, 2016 at 10:5

2

Solved

Building on this question, I have a workflow where I'm constantly making PRs on top of PRs to make it easier for others to review my work. Goal is to have smaller PR sizes. So I often end up with s...
Splint asked 12/10, 2020 at 20:1

6

Solved

In Git I can use an interactive rebase to re-write history, this is great because in my feature branch I made a ton of commits with partially working code as I explored different refactors and ways...
Embosser asked 26/5, 2017 at 22:9

3

Solved

Suppose I have the following git history: a master branch starting with commit A, a feature-1 branch branched off of A with commits B and C, and a second feature branch feature-2 that built off of ...
Bartlet asked 2/8, 2020 at 16:56

1

I want to create bash script that squashes commits with same name in a row. The user should be able to enter the commit number between which it will search for commit names and if it finds 2 simila...
Forefend asked 12/6, 2022 at 15:44

8

Whilst I am working on new code, I make many small commits to track my changes. My company, however, prefers each feature to be committed as a single commit. So the solution is to squash my entire ...
Nutwood asked 29/12, 2014 at 17:24

6

Ever since GitHub introduced Squash and Merge, all the cool kids at my workplace are using it when merging pull requests. Is there a way to cleanup "Squash and Merge" branches? The following comm...
Duwalt asked 19/4, 2017 at 7:32

5

Solved

How can I tell cherry-pick to pick range of commits and squash it? Or in other words, apply the diff between two commits to the current state of the repository? The following does not work (cherry-...
Brnaby asked 1/2, 2016 at 4:41

2

I have a parent branch A with a child branch B. In branch B i have two separate commits. I merged branch B in A with squash like this git merge --squash B When i compare branch A with branch B:...
Stephan asked 24/9, 2014 at 6:39

1

Solved

I have the following situation: I've worked on a feature branch (called work1) to which I have an outstanding PR. While I wait for the PR to be approved, I want to start working on a new feature br...
Optometer asked 24/6, 2022 at 21:2

3

Solved

If I have commit A tagged with tag e.g. tag-A, and then the next commit B tagged with tag-B; if I squash these 2 commits what happens to the tags? Will both be assigned to the squashed commit?
Prelusive asked 20/1, 2019 at 21:54

2

I have a fork of another repo @github. did some code and issued a pull request to upstream upstream master merged with squash option now next pull request includes new code and the older commits ...
Rambouillet asked 14/10, 2016 at 19:34

1

Solved

I have merged a develop branch into main branch using squash merge. Let's say there are commit A, B, C merged into main from develop. The changes are successfully merged. I can see the squash commi...
Aeroplane asked 20/9, 2021 at 21:48

2

Solved

We can squash the last N commits in Git. As I understand, we can squash last N commits using git rebase -i HEAD~N or git reset --soft HEAD~N. In the answers for this question (Squash my last X comm...
Respirable asked 29/8, 2021 at 9:22

1

Solved

Consider the following practice: A developer branches from main and creates as many commits as needed in a feature branch Once the feature is completed, all commits are squashed and merged into th...

© 2022 - 2024 — McMap. All rights reserved.