Extra

(Extra) Grenar / Branscher

I Githubs kodlagrin kan vi även “bryta ut” koden i olika “grenar” som kan innehålla olika versioner eller delar av våran kod.
Så att vi kan utveckla olika versioner och delar av vår applikation parallellt och sedan slå ihop de delarna med varandra om vi vill.
bild.png

Branches in Git are nothing but pointers to a specific commit. Git generally prefers to keep its branches as lightweight as possible.
There are basically two types of branches viz. local branches and remote tracking branches.
A local branch is just another path of your working tree.
bild.png
bild.png

About branches

Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository.
You always create a branch from an existing branch. Typically, you might create a new branch from the default branch of your repository. You can then work on this new branch in isolation from changes that other people are making to the repository. A branch you create to build a feature is commonly referred to as a feature branch or topic branch. For more information, see "."
You can also use a branch to publish a GitHub Pages site. For more information, see "."
You must have write access to a repository to create a branch, open a pull request, or delete and restore branches in a pull request. For more information, see "."

About the default branch

When you create a repository with content on GitHub.com, GitHub creates the repository with a single branch. This first branch in the repository is the default branch. The default branch is the branch that GitHub displays when anyone visits your repository. The default branch is also the initial branch that Git checks out locally when someone clones the repository. Unless you specify a different branch, the default branch in a repository is the base branch for new pull requests and code commits.
By default, GitHub names the default branch main in any new repository.
You can change the default branch for an existing repository. For more information, see "."

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.