squashing branch results in two branches--one squashed, one unsquashed--and unsquashed one merged back into squashed oneMake an existing Git branch track a remote branch?Squash the first two commits in Git?Showing which files have changed between two revisionsHow do you create a remote Git branch?Branch from a previous commit using GitSquash my last X commits together using GitHow can I delete all Git branches which have been merged?How to get the current branch name in Git?Git fetch remote branchHow to fetch all Git branches
Have Steve Rogers (Captain America) and a young Erik Lehnsherr (Magneto) interacted during WWII?
Co-worker is now managing my team. Does this mean that I'm being demoted?
On George Box, Galit Shmueli and the scientific method?
Is the infant mortality rate among African-American babies in Youngstown, Ohio greater than that of babies in Iran?
How to search for Android apps without ads?
What is the precise meaning of "подсел на мак"?
Converting 3x7 to a 1x7. Is it possible with only existing parts?
Can I drive in EU states and Switzerland with German proof of a surrendered U.S. license?
Using roof rails to set up hammock
How can the US president give an order to a civilian?
Huge Heap Table and table compression on SQL Server 2016
Why is gun control associated with the socially liberal Democratic party?
...and then she held the gun
Why can't I craft scaffolding in Minecraft 1.14?
Why can't we feel the Earth's revolution?
High-end PC graphics circa 1990?
How did space travel spread through the galaxy?
Right indicator flash-frequency has increased and rear-right bulb is out
Why are almost all the people in this orchestra recording wearing headphones with one ear on and one ear off?
How to ask if I can mow my neighbor's lawn
TiKZ won't graph 1/sqrt(x)
Schedule Batch Apex too many rows
What is this plant I saw for sale at a Romanian farmer's market?
Print the phrase "And she said, 'But that's his.'" using only the alphabet
squashing branch results in two branches--one squashed, one unsquashed--and unsquashed one merged back into squashed one
Make an existing Git branch track a remote branch?Squash the first two commits in Git?Showing which files have changed between two revisionsHow do you create a remote Git branch?Branch from a previous commit using GitSquash my last X commits together using GitHow can I delete all Git branches which have been merged?How to get the current branch name in Git?Git fetch remote branchHow to fetch all Git branches
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I’m working in SourceTree. I tried to squash a branch. When I did so, it seemed to work successfully, but it preserved all the individual commits on a separate branch. Actually, what it looked like was that the local branch got squashed and therefore became out of sync with the remote branch. The graph ended up looking like this:
squashed and unsquashed branches http://www.shahspace.com/squashed%20and%20unsquashed%20branches.png
Then I decided to continue pushing commits along the squashed branch. This resulted in the unsquashed branch merging into the squashed branch:
unsquashed branch merged with squashed branche http://www.shahspace.com/unsquashed%20branch%20merged%20with%20squashed%20branch.png
This sucks because it defeats the whole purpose of squashing (at least for us). The reason we want to squash our branches is because when we merge them into the master branch, we don’t want 50 commits coming with it. We’d like the merge to be represented by just one commit on the master branch, a commit with a message like “squashed feature branch xyz”.
What would be ideal, in other words, is for the unsquashed branch to simply be thrown away (or at least, don’t merge with the squashed branch when I continue to push commits to it). Can this be done in SourceTree?
branch atlassian-sourcetree squash
add a comment |
I’m working in SourceTree. I tried to squash a branch. When I did so, it seemed to work successfully, but it preserved all the individual commits on a separate branch. Actually, what it looked like was that the local branch got squashed and therefore became out of sync with the remote branch. The graph ended up looking like this:
squashed and unsquashed branches http://www.shahspace.com/squashed%20and%20unsquashed%20branches.png
Then I decided to continue pushing commits along the squashed branch. This resulted in the unsquashed branch merging into the squashed branch:
unsquashed branch merged with squashed branche http://www.shahspace.com/unsquashed%20branch%20merged%20with%20squashed%20branch.png
This sucks because it defeats the whole purpose of squashing (at least for us). The reason we want to squash our branches is because when we merge them into the master branch, we don’t want 50 commits coming with it. We’d like the merge to be represented by just one commit on the master branch, a commit with a message like “squashed feature branch xyz”.
What would be ideal, in other words, is for the unsquashed branch to simply be thrown away (or at least, don’t merge with the squashed branch when I continue to push commits to it). Can this be done in SourceTree?
branch atlassian-sourcetree squash
add a comment |
I’m working in SourceTree. I tried to squash a branch. When I did so, it seemed to work successfully, but it preserved all the individual commits on a separate branch. Actually, what it looked like was that the local branch got squashed and therefore became out of sync with the remote branch. The graph ended up looking like this:
squashed and unsquashed branches http://www.shahspace.com/squashed%20and%20unsquashed%20branches.png
Then I decided to continue pushing commits along the squashed branch. This resulted in the unsquashed branch merging into the squashed branch:
unsquashed branch merged with squashed branche http://www.shahspace.com/unsquashed%20branch%20merged%20with%20squashed%20branch.png
This sucks because it defeats the whole purpose of squashing (at least for us). The reason we want to squash our branches is because when we merge them into the master branch, we don’t want 50 commits coming with it. We’d like the merge to be represented by just one commit on the master branch, a commit with a message like “squashed feature branch xyz”.
What would be ideal, in other words, is for the unsquashed branch to simply be thrown away (or at least, don’t merge with the squashed branch when I continue to push commits to it). Can this be done in SourceTree?
branch atlassian-sourcetree squash
I’m working in SourceTree. I tried to squash a branch. When I did so, it seemed to work successfully, but it preserved all the individual commits on a separate branch. Actually, what it looked like was that the local branch got squashed and therefore became out of sync with the remote branch. The graph ended up looking like this:
squashed and unsquashed branches http://www.shahspace.com/squashed%20and%20unsquashed%20branches.png
Then I decided to continue pushing commits along the squashed branch. This resulted in the unsquashed branch merging into the squashed branch:
unsquashed branch merged with squashed branche http://www.shahspace.com/unsquashed%20branch%20merged%20with%20squashed%20branch.png
This sucks because it defeats the whole purpose of squashing (at least for us). The reason we want to squash our branches is because when we merge them into the master branch, we don’t want 50 commits coming with it. We’d like the merge to be represented by just one commit on the master branch, a commit with a message like “squashed feature branch xyz”.
What would be ideal, in other words, is for the unsquashed branch to simply be thrown away (or at least, don’t merge with the squashed branch when I continue to push commits to it). Can this be done in SourceTree?
branch atlassian-sourcetree squash
branch atlassian-sourcetree squash
asked Mar 25 at 3:53
Gibran ShahGibran Shah
85
85
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331055%2fsquashing-branch-results-in-two-branches-one-squashed-one-unsquashed-and-unsq%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331055%2fsquashing-branch-results-in-two-branches-one-squashed-one-unsquashed-and-unsq%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown