Difference between revisions of "GIT"
(New page: #!/bin/bash # git-create-branch <branch_name> if [ $# -ne 1 ]; then echo 1>&2 Usage: $0 branch_name exit 1 fi branch_name=$1 git checkout -b ${branch_name} git push origin ${b...) |
|||
Line 1: | Line 1: | ||
+ | <source lang="bash"> |
||
#!/bin/bash |
#!/bin/bash |
||
Line 15: | Line 16: | ||
git branch --set-upstream ${branch_name} origin/${branch_name} |
git branch --set-upstream ${branch_name} origin/${branch_name} |
||
+ | |||
+ | </source> |
||
# To delete the remote branch: |
# To delete the remote branch: |
Revision as of 00:05, 19 February 2013
#!/bin/bash
# git-create-branch <branch_name>
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 1
fi
branch_name=$1
git checkout -b ${branch_name}
git push origin ${branch_name}
git branch --set-upstream ${branch_name} origin/${branch_name}
- To delete the remote branch:
- git push origin :${branch_name}