mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
feat(feature): checkout from start point if exists
This commit is contained in:
parent
41732e4113
commit
d3772eb469
|
|
@ -32,6 +32,10 @@ do
|
|||
--squash )
|
||||
merge_mode="--squash"
|
||||
;;
|
||||
--from )
|
||||
start_point=$2
|
||||
shift
|
||||
;;
|
||||
* )
|
||||
argv+=($1)
|
||||
;;
|
||||
|
|
@ -55,10 +59,24 @@ else
|
|||
else
|
||||
branch="$branch_prefix"/"${argv[0]}"
|
||||
fi
|
||||
if [[ -n $remote ]]
|
||||
|
||||
if [[ -n $remote ]] && [[ -z $start_point ]]
|
||||
then
|
||||
git create-branch -r $remote $branch
|
||||
else
|
||||
fi
|
||||
|
||||
if [[ -z $remote ]] && [[ -z $start_point ]]
|
||||
then
|
||||
git create-branch $branch
|
||||
fi
|
||||
|
||||
if [[ -n $remote ]] && [[ -n $start_point ]]
|
||||
then
|
||||
git create-branch -r $remote --from $start_point $branch
|
||||
fi
|
||||
|
||||
if [[ -z $remote ]] && [[ -n $start_point ]]
|
||||
then
|
||||
git create-branch --from $start_point $branch
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue