Created
July 19, 2023 23:17
-
-
Save listenrightmeow/7d641465e65b6e9c47346233740c3762 to your computer and use it in GitHub Desktop.
Push history-less/empty branch to origin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
empty = "!sh -c 'git switch --orphan $0 && git commit --allow-empty -m \"empty commit\" && git rebase --onto master $0 && git push -u origin $0'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git empty branch/name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment