- #144728
Replies: 2 comments 1 reply
-
To resolve this issue, you will need to force push your squashed commits to the remote repository. Here are the steps to do so:
This command will overwrite the remote branch with your local branch's history, including the squashed commits.
Please note that force pushing can overwrite commits on the remote repository, so ensure you have communicated with any collaborators before performing this action to avoid disrupting their work. |
Beta Was this translation helpful? Give feedback.
-
Hello, thank you for the response. I'm afraid that didn't solve the issue-
in fact after squashing I did precisely that. Every squash and git push
origin main --force resulted in more duplicate commits.
I decided to just duplicate the repository and delete the original one to get rid of the commit history.
Thank you,
Yonatan
…On Tue, Nov 19, 2024 at 3:15 PM SjxSubham ***@***.***> wrote:
To resolve this issue, you will need to force push your squashed commits
to the remote repository. Here are the steps to do so:
1.
Ensure your local branch has the correct history:
- Open GitHub Desktop and verify that your local branch has the
squashed commits.
2.
Force push the local branch to the remote repository:
- Open a terminal (you can do this from GitHub Desktop by selecting
Repository > Open in Terminal).
- Ensure you are on the correct branch by running:
git checkout <your-branch-name> ```
- Force push your local branch to the remote repository by running:
git push origin <your-branch-name> --force
This command will overwrite the remote branch with your local branch's
history, including the squashed commits.
3.
Verify the changes on GitHub:
- After the force push, go to your repository on GitHub and verify
that the commit history now reflects the squashed commits.
Please note that force pushing can overwrite commits on the remote
repository, so ensure you have communicated with any collaborators before
performing this action to avoid disrupting their work.
—
Reply to this email directly, view it on GitHub
<#144728 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5GTXIYM737NQAVEMV2YJKT2BOL47AVCNFSM6AAAAABR4IT6LGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZRGEZDOMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions