GIT - branches, what is branch? -


i new git. want create new branch: have 3 files inside repository.

if create new branch, have copy files; or copied automatically if create new branch?

when want work on branch, have switch branch inside git, before start work (opening files)? thank help

i want create new branch

# checkout new branch based upon current branch  git checkout -b <new branch name> 

if create new branch, have copy files; or copied automatically if create new branch?

the new branch full copy current branch.
in order understand why need know branch in git.


what branch in git?

a branch in git lightweight movable pointer commit.
here short , simple post it

in other words:

branch in git pointer commit.
can see in image below (taken post mentioned above), branches pointing commit b + delta added them.

when create branch git creates file , writing commit id file.

enter image description here

when want work on branch, have switch branch inside git, before start work (opening files)?

this what's checkout -b - switch new branch enter image description here


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -