Last active
May 5, 2019 03:32
-
-
Save xudshen/41f670824f42b55a9f530214a61ec7ef to your computer and use it in GitHub Desktop.
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
git config --global alias.make-patch '!bash -c "cd ${GIT_PREFIX:-.}; git add .; git commit -m ''uncommited''; git format-patch HEAD~1; git reset HEAD~1; mkdir -p ~/Dropbox/$(git config --get remote.origin.url)/$(git rev-parse HEAD); mv *.patch ~/Dropbox/$(git config --get remote.origin.url)/$(git rev-parse HEAD)/"' | |
git config --global alias.apply-patch '!bash -c "cd ${GIT_PREFIX:-.}; [ -d "~/Dropbox/$(git config --get remote.origin.url)/$(git rev-parse HEAD)" ] && cat ~/Dropbox/$(git config --get remote.origin.url)/$(git rev-parse HEAD)/*.patch | git am && git reset HEAD~1"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment