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.

git-squash
2 votes
2 answers
537 views

Checkout to one of squashed commits

In a repository with squash-merge practice, can I go to the state of the repository in one of the squashed commits? For the example below, I want to find commit m1 by checking out commit r1. m1 - m2 --...
Erdem Tuna's user avatar
1 vote
0 answers
765 views

Validate commit message contains Jira Ticket Number when squash merge from GitHub webUI

When doing a squash merge, following a successful Pull Request, on github I would like to validate that the squash merge commit message contains a Jira ticket number. If it does not the squash merge ...
user19156346's user avatar
1 vote
1 answer
457 views

Avoid old commits after squashing into a branch

I have 2 branches. main and deploy. I keep committing changes to the main branch, and when it's the time to deploy, I raise a PR to deploy from main and squash all commits for a cleaner commit history ...
user3515181's user avatar
5 votes
0 answers
680 views

Visual Studio: squash intermediate commits

I can squash the last commits easily with with Visual Studio. However, if I don't select the latest commit, squash commits menu entry is grayed. Is there a solution with visual Studio to squash ...
Kiruahxh's user avatar
  • 1,760
0 votes
1 answer
312 views

How to work on a new git branch while previous branch waits for merge

First, I am sorry to ask such question because I am sure it is a straightforward issue, still I found no solution an no way to understand what I am doing wrong. Some people asked almost exactly the ...
haltux's user avatar
  • 61
3 votes
0 answers
689 views

Using an interactive rebase, how do I squash some commits, including merges?

I've read a LOT of questions on here and help documents, but I can't seem to find any solid, understandable documentation that explains addresses my needs. I work on a team that's making a major code ...
RLH's user avatar
  • 15.6k
1 vote
1 answer
2k views

Squash merging in git keeps including previously-merged branches

I'm using Github, with branches for development, live and various feature & bug branches. When I merge a feature or bugfix into development, I typically do a squash merge (usually through the GH ...
Adam Hopkinson's user avatar
0 votes
1 answer
34 views

Combine 2 commits that are NOT the last 2 commits on my branch

I have to following 4 commits: #Commit4 #Commit3 #Commit2 #Commit1 After making commits 3 and 4 I realized my first 2 commits really should be a single commit like so: #Commit4 #Commit3 #...
RayLoveless's user avatar
  • 20.8k
0 votes
1 answer
204 views

Documentation of Default Target of "git merge --squash"

Sometimes I squash a bunch of commits together. Usually my commands follow this pattern: git reset --hard HEAD~4 git merge --squash HEAD@{1} git commit Today, though, at step 2, I got distracted by ...
Kirby's user avatar
  • 15.6k
0 votes
1 answer
1k views

GitHub Pull Request: Squash before merge without fast-forward

GitHub offers three options to merge PRs: Merge pull request: No fast-forward merge. Squash and merge: Squash commits and perform fast-forward merge. Rebase and merge: Rebases all commits onto the ...
Yannic's user avatar
  • 788
0 votes
2 answers
2k views

Git + IntelliJ - how to make files appear again in commit-tab

IntelliJ has this nice features with a commit-tab in their IDE, which allows you to see all the changes in all files, and also has the revert-button and a lot of other useful functions that I like. ...
klabbaparn's user avatar
2 votes
2 answers
2k views

Git interactive rebase did not delete my other commits

I have some commits in my current branch. I want to convert those all commits into one commit and delete all those commits. So I have used the following commands git rebase -i HEAD~9 Edited all ...
smnth90's user avatar
  • 798
4 votes
1 answer
1k views

What happens to the child branch when I have squashed the commits from parent branch and merged it into master?

My branching looks like this M1 --- M2 --- M3 --- ............. --- M50 --- M51 \ \ P1 --- P2 --- P3 --- P4 \ ...
Trilokinath Modi's user avatar
0 votes
2 answers
893 views

Commit Author Not showing recent commiter name when doing Git Squash

I have a branch and few commits done by some other person. I committed few more changes to the same branch. Now i am squashing all commits to one single commit using below commands. git rebase -i HEAD~...
Deadpool_er's user avatar
7 votes
1 answer
3k views

Still compare committed difference after squash merging

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 commit ...
WenliL's user avatar
  • 497

15 30 50 per page
1 2
3
4 5
15