Last active
March 25, 2025 14:09
-
-
Save D1360-64RC14/80691401a0331a840c0276f05a6a66dd to your computer and use it in GitHub Desktop.
Git commands to automate repetitive tasks. Store then in a directory accessible by PATH and do `git <command>`, like `git spull`.
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
#!/bin/bash | |
# Push setting current branch as default upstream | |
git push -u origin $(git branch --show-current) |
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
#!/bin/bash | |
# Stash -> Pull -> Pop | |
git stash | |
git pull | |
git stash pop |
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
#!/bin/bash | |
# Stash -> Pull -> Push -> Pop | |
git stash | |
git pull | |
git stash pop | |
git push |
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
#!/bin/bash | |
# Stash -> Push -> Pop | |
git stash | |
git push | |
git stash pop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment