Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git create branch from master

# workflow, step by step:
git checkout srcBranch		# where new branch will be created from
git branch newBranch		# newBranch is created from srcBranch
git checkout newBranch		# switch from srcBranch to newBranch

# in a single line:
git checkout -b newBranch srcBranch
git checkout -b newBranch	# srcBranch is optional if already checked out
 
PREVIOUS NEXT
Tagged: #git #create #branch #master
ADD COMMENT
Topic
Name
2+2 =