Skip to main content

All Questions

Tagged with
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
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
0 votes
1 answer
102 views

Git squash last six commits after requested for PR in upstream

I requested pr#1 from origin/master to upstream. Then I created a new branch ipython_feature while checkout in the master. Before merging pr#1 I requested pr#2 which has some changes with pr#1. Later ...
Loghi Perinpanayagam's user avatar
7 votes
4 answers
2k views

How to tell if git branch has been fully merged after squash

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, ...
digory doo's user avatar
  • 2,192
1 vote
1 answer
113 views

Keeping clean git branches, but not causing conflicts in the meantime

I've been working on getting my team's git workflow down and succinct. Our team uses master,staging, and development branches for our build servers. When a new task/feature is being worked on, we ...
Neurax's user avatar
  • 3,717
3 votes
3 answers
6k views

How do I squash commits when I have merged with dev in between?

I have worked on a feature branch for a few days and it's now ready to merge into dev. While working on this feature, I have merged with dev to receive a patch. My history looks like this: * E (...
lfk's user avatar
  • 2,583
1 vote
2 answers
2k views

How to merge to another branch with only two commits and with one commit squashed?

I have created a branch for development and it has some useless commits. Now I want to merge the commits to the mainline branch. The only commits I want in the origin/master branch is the latest ...
lezzago's user avatar
  • 271
3 votes
3 answers
2k views

Is it safe to squash commits from other branch

There are two branches master and feature. The development goes in feature branch and there multiple commits done in that branch, but in between them there were several merges with master branch, so ...
marknorkin's user avatar
  • 4,064
77 votes
6 answers
12k views

How can I delete all git branches which have been "Squash and Merge" via GitHub?

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 command ...
png's user avatar
  • 6,410
0 votes
1 answer
3k views

How to squash the commits before I merge into master?

I branched out from master and worked in my new branch branchA, I made a few commits in branchA and merged master now and then into branchA to keep it updated with the latest change. Now I want to ...
litaoshen's user avatar
  • 1,812
5 votes
1 answer
4k views

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

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 ...
Julien__'s user avatar
  • 1,998
6 votes
3 answers
5k views

How to sync up your git dev branch after you've merged+squashed a PR to master, in GitHub?

So GitHub has the ability to merge+squash commits for a PR. We follow the process of PR'ing code from dev -> master. Previously, I've been just 'merging' the PR's but that generates a new commit ...
Pure.Krome's user avatar
  • 86.2k
1 vote
1 answer
894 views

git merge --squash (branch) gives error

Currently I have a 1-user-model branch. From here, I then checked out and created a 1-user-model-squash branch. Then when I try to run git merge --squash 1-user-model, I get this error. fatal: ...
kyangy's user avatar
  • 65
3 votes
2 answers
6k views

How to squash merge multiple commits from branch to master in a single commit using SmartGIT?

I have a branch called work_in_progress which is used to debug and test code with many small commits. All of them have redundant commit messages. When I'm finished I want to merge squash to master ...
FrozenTarzan's user avatar

15 30 50 per page