Created
July 3, 2020 16:47
-
-
Save Demwunz/8d74edb6fa50042b06b12911142ddfc8 to your computer and use it in GitHub Desktop.
A collection of some useful git commands
This file contains 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
# delete all local branches that have been merged into master | |
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch - | |
# amend a commit to the current time | |
git commit --amend --date="now" | |
# add empty git commit without adding files | |
git commit --allow-empty -m "This will trigger a build" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment