Skip to main content

Questions tagged [git-squash]

git squash is the command used to rewrite git history before it is pushed to the remote.

0 votes
0 answers
39 views

Can't fully squash commits

The commit Paises ISO 3166-1 all modify the same files and leave them in the same state. Is there any way to make it so there's only 1 commit Paises ISO 3166-1 on the blue line right before the ...
Daviid's user avatar
  • 1,489
2 votes
2 answers
159 views

Squashing first few dozens of git commits that contain merge commits

I have an existing repository that has root R, then a few dozens of commits including multiple merges, up to X, and then linear history up to Y. I'd like to squash everything from R to X into a single ...
Xilexio's user avatar
  • 1,228
2 votes
1 answer
685 views

Cannot squash merge in GitHub Desktop

When trying to squash merge 3 commits in GitHub Desktop, I was warned with the following error message: Unable to squash. Squashing replays all commits up to the last one required for the squash. A ...
Paris Geis's user avatar
0 votes
1 answer
669 views

squash commits in git and remove "ugly" merge message

I am trying to squash 2 commits and remove merge part, but have some problems. I have branch main and featureBranch. In my terminal I do: git checkout main git merge --squash featureBranch git push ...
Kratos's user avatar
  • 841
0 votes
0 answers
49 views

How to fetch changes from a forked repository which is a subtree

So I have an issue wherein I forked Repository A to create Repository B. Then I added Repository B into a subdirectory of Repository C via the subtree command as follows: git subtree add --prefix={...
user3684314's user avatar
0 votes
0 answers
42 views

Delete/Squash old commits while keeping the changes that they introduced [duplicate]

I'm trying to delete/squash a bunch of old commits that I don't want on my git history which were just made to put together code from multiple locations that were not using git (local folders from ...
Girog's user avatar
  • 1
1 vote
0 answers
12 views

Squashing commits not in series using git rebase [duplicate]

I have multiple commits done on a branch for a C project and would like to squash them into just two commits. Commit 1 - should have only the changes to the actual functionality source code Commit 2 - ...
Engineer999's user avatar
  • 3,873
1 vote
1 answer
515 views

Squash git commits by author [duplicate]

I have a repository to which several (3) authors contributed commits to the same branch of the repo. I want to merge it to the repository from which it was forked, but the admin of that repository ...
John's user avatar
  • 481
0 votes
1 answer
81 views

Git: remove some commits from a branch

Let's say I have, in a given working branch, a history of commits that looks like the below: commithash1 [task-a] lorem ipsum commithash2 [task-a] dolor sit amet commithash3 [task-b] consectetur ...
darksoulsong's user avatar
1 vote
3 answers
268 views

How to correct bug in merge - squash fix commit to merge commit

this should be probably very easy, but I am not able to solve it out. I introduced bug in the merge, and than I corrected it in additional commit. I would like to squash the "bug fix" commit ...
Jakub Znamenáček's user avatar
0 votes
1 answer
307 views

Squashing commits gone wrong [duplicate]

Say I have pushed two commits and I and try to squash them. Instead of doing git rebase -i HEAD~2 - I accidentally do git rebase -i HEAD~3 Here the 3rd last commit is from someone else but it would ...
R11G's user avatar
  • 1,940
0 votes
1 answer
77 views

Undo git commit message in 2 different branches (develop and feature) after git push

do not want to break anything in the master branch. I forked a develop branch through below commands git checkout develop git pull upstream develop # pull the updates locally based on the git push ...
Ahamed Kamal's user avatar
8 votes
1 answer
1k views

Branching from a feature branch and reconciling commits after main squash merge

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 ...
Leonardo's user avatar
  • 1,703
0 votes
1 answer
132 views

How Can I git squash commit after PR completed?

In our projects, We use policy squash merge for merging and release our project when merge release branch to master branch. one of my co-worker use no fast-forward merge and put all develop's history ...
Alex's user avatar
  • 31
0 votes
1 answer
40 views

bash script that squashes commits with same name in a row

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 similar ...
Haso Rosy's user avatar

15 30 50 per page
1
2
3 4 5
15