Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
135 views

My history is linear: ... — B — C I make an interactive rebase to B~1 and set to edit B, pick C. All I do with B is to add a file to the gitignore, rm --cache -r . and commit --amend --no-edit it. ...
Ooker's user avatar
  • 3,404
-1 votes
2 answers
138 views

I have a branch in GitLab with 18 commits, with a lot of back and forth trying the right way to escape something. Ideally, the branch should have three commits, changing three different parts of the ...
JF Meier's user avatar
  • 36.7k
3 votes
3 answers
150 views

Say there is a squash of 3 commits into a single commit like so: pick abc Jan 1 stuff squash def Jan 2 stuff squash ghi Jan 3 stuff pick jkl Jan 4 stuff pick mno Jan 5 stuff In the above, my ...
1192805's user avatar
  • 1,126
1 vote
1 answer
99 views

When making commits, I tend to say things like "Removed xyz property" in my commit message, where the commit message kind of depends on you seeing the file list in order to see which files ...
davidalayachew's user avatar
0 votes
4 answers
113 views

This is a scenario I've run into multiple times: suppose you have a feature branch, and you then need to merge in the develop branch and resolve conflicts prior to your PR being merged. You merge ...
Anomaly's user avatar
  • 1,142
-2 votes
3 answers
176 views

I've been pair programming with a colleague, I know he squashed all the commits on our branch (that's how we do in our team, before merging). However, I need to modify the branch. This context is ...
arso's user avatar
  • 2,367
-4 votes
1 answer
142 views

I need to retain only the initial & latest commit in both the master and release branches of my Gerrit repository. So how do i remove all previous commits and keep only the initial(repository ...
user4948798's user avatar
  • 2,158
-3 votes
5 answers
259 views

I want to reduce the size of my repository by removing all commits older than the 5th commit ago. This question is different than other questions because I am looking for answers only for that very ...
Be Kind To New Users's user avatar
0 votes
1 answer
118 views

I have a minor git issue that keeps coming up. I have a feature that's in a PR, and then another feature that is dependent on it.The base for the second feature is squash merged. The second feature ...
philosofool's user avatar
  • 1,023
2 votes
2 answers
94 views

I have two non-sequential commit abc123 and def456. I want to squash them together in a way that fulfil the following requirements, their original commit messages remain reusable. done in a non-...
nabik's user avatar
  • 77
1 vote
1 answer
95 views

I'm trying to reconcile a very large feature branch with hundreds of commits that multiple teams and agencies worked on for a long time period. Unfortunately due to corporate policy issues it wasn't ...
user56reinstatemonica8's user avatar
-1 votes
1 answer
75 views

If I am merging a feature branch feature into the main branch, what difference does it make (with respect to the main branch's history) whether I do a squash and merge or a simple merge? Before merge: ...
Ayush Garg's user avatar
0 votes
0 answers
177 views

I'm working on a project using GitHub to manage our workflow. We've got main and we cut a new release/24XX.XX branch for each release. When the release goes out the door we squash merge it back to ...
Greg B's user avatar
  • 14.9k
0 votes
1 answer
76 views

I have a git log like this * cb0bfd5 (HEAD -> feat/nuxt, fork/feat/nuxt) Split into icons * f2d2410 fix: buttons spaces & move layouts to components (#3) * 881d4ab Split into Components, ...
Bernd Storath's user avatar
-1 votes
2 answers
154 views

I have a personal project GitHub repository that used the squash and merge option for pull requests. How do I rewrite the Git history so that the pull requests used the merge commit option instead of ...
Jacob Guiang's user avatar
0 votes
1 answer
142 views

My team has recently transitioned to a GitHub Actions CI/CD workflow and we are encountering an issue that I'm uncertain how best to resolve. First, I'll describe our current branching strategy: We ...
NoxelNyx's user avatar
  • 997
2 votes
4 answers
2k views

Let's say we have a Pull Request merging the commits from branch A into branch B, and we can perform the merge with normal merge and squash merge. And if we first perform the merge with squash merge (...
Jason Yu's user avatar
  • 2,098
1 vote
0 answers
69 views

I have a branch named myBranch, which I'm working on for a complex feature for a long time. After I finished my work and wanted to open a merge request, gitlab showed that 47 commits was done in my ...
uylmz's user avatar
  • 1,580
0 votes
1 answer
63 views

Hello to the community! As you can see in the diagram there is a commit (cm1) that includes a lot of binary files that was committed in a local branch. This commit was reverted at cm2 and at the final ...
Nebula's user avatar
  • 51
1 vote
0 answers
73 views

We have a setup with two repositories, dev repository and deploy repository (can't change that) with rebase-only merge strategy. Initially dev repo looked like this: main: A -> B -> C -> D ...
Virgileo's user avatar
-1 votes
2 answers
801 views

I want to squash all the commits till a particular commit-id in a branch. I tried using the command git reset --soft HEAD~223 The number 223 was generated as follows: I ran the command git rev-list ...
pensee's user avatar
  • 585
1 vote
1 answer
76 views

I did a mess with my features branches. What I had: master: A - B \ branch1: E - F \ branch2: G - H And then I squashed and merge ...
Chana Drori's user avatar
0 votes
2 answers
390 views

I have been using squash with the steps below and I find it really time consuming and error prone git rebase upstream/develop git merge-base mylocaldev upstream/develop (this will display a commit ...
user3277841's user avatar
0 votes
1 answer
53 views

Now there is a branch(branch1), three people P1 P2 P3 they develop together on branch1 with the comimit log P1 commit1 P2 commit2 P3 commit3 P3 commit4 P1 commit5 P2 commit6 ... P1 commit100 ...
moe_sakura's user avatar
0 votes
2 answers
980 views

I have a "long lived feature" branch that i have been working for last 2 months. It has 211 commits that i want to squash into single commit before this "long lived feature branch" ...
ASy_Dev's user avatar
  • 11
3 votes
2 answers
131 views

When I work in a team and must push my local branch to the remote main, I rebase firstly my local branch to master with this simple command: git fetch && git rebase origin/main But when I do ...
okli's user avatar
  • 33
2 votes
1 answer
243 views

I have are requirement that the main branch has only one (potentially big) commit per issue ID. However, to confirm to the best practice of small commits, I also need to create and keep(!) multiple ...
Marco Eckstein's user avatar
0 votes
1 answer
265 views

Let's say I have several consecutive commits, we name them A0..A99 for simplicity, pushed by the same author to the main branch: these commits are not the last commits pushed to the main branch as ...
simone.tino's user avatar
  • 2,531
0 votes
0 answers
39 views

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,601
2 votes
3 answers
206 views

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,238
2 votes
1 answer
2k views

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
881 views

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
  • 1,007
0 votes
0 answers
54 views

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
46 views

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
14 views

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
  • 4,159
1 vote
1 answer
765 views

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
  • 497
0 votes
1 answer
92 views

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
  • 15.5k
1 vote
3 answers
313 views

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
442 views

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
  • 2,000
0 votes
1 answer
103 views

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
10 votes
1 answer
2k views

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
  • 2,020
0 votes
1 answer
160 views

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
  • 41
0 votes
1 answer
57 views

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
2 votes
2 answers
705 views

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
914 views

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
2 votes
1 answer
582 views

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
6 votes
0 answers
2k views

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
  • 2,203
0 votes
1 answer
347 views

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
747 views

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.8k
1 vote
1 answer
2k views

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

1
2 3 4 5