Answers for "git checkout -f"

8

git checkout -b

# git checkout regarding branches switch

git checkout <branch_name>
# will take you to that branch

git checkout -b <new_branch> 
# will create a new branch based on the branch you are already in
# if this branch already exists then you will get the following msg:
# 'A branch named <new_branch> already exists.'

git checkout -B <new_branch>
# will create a new branch.
# WATCH OUT though! if this branch already exists it will reset it!

git checkout origin/<branch_name> -b <branch_name_2>
# will create a new branch based on the remote one
Posted by: Guest on February-16-2021
8

git create new branch from current

git checkout -b topic/newbranch
Posted by: Guest on March-05-2020
4

createa. branch off of development git

//when on branch 'dev' make branch 'myFeature' off of 'dev'
git checkout -b myFeature dev
Posted by: Guest on March-17-2020
9

git checkout

git checkout -b origin/branch-name
git checkout -b branch-name
Posted by: Guest on July-23-2020
4

how to create new branch

How to create a new branch in git 

$ git checkout -b good

here good is new branch name
the line 3 after executing we will go to that branch
Posted by: Guest on October-05-2020
1

git checkout -f

//the below code can recover your last commited files 
git checkout -f
Posted by: Guest on April-25-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language