Created
July 14, 2023 05:25
-
-
Save ThaiDat/8c7fb23a4822e97cb1f527e289e5efbf to your computer and use it in GitHub Desktop.
Revisions
-
ThaiDat created this gist
Jul 14, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/sh # Usage: pushes current checkout branch to remote # Ex: git publish origin if [ -z ${1+x} ] && [ $(git remote | wc -l) -eq 1 ]; then remote=$(git remote) else remote=$1 fi git push --set-upstream $remote $(git branch --show-current)