I am new to GIT & in learning phase of GIT Concepts. I have two simple & quick questions.
Q1. Whenever we want to create a new branch, we type below command:
git checkout -b BranchName
Here, my question is that git checkout
consider which branch as it's source branch while creating new branch?
- Does it consider
master
branch as source branch? - Does it consider current branch as source branch?
Q2. Suppose, whatever branch which it is considering as source branch is not up to date from remote. So while creating a new branch from that source branch, does it create a pull for the source branch & then create new one OR it considers local branch as it's base and doesn't pull anything from server?