File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1+ branch version 2
Original file line number Diff line number Diff line change @@ -85,14 +85,50 @@ git commit -m "comments"
8585
8686## Branches
8787
88- TO DO
88+ <<<<<<< HEAD
89+ List of branches
90+ ```
91+ git branch
92+ ```
93+
94+ Create a new branch
95+ ```
96+ git branch {name}
97+ ```
98+
99+ Checkout the branch (switch to that branch)
100+ ```
101+ git checkout {dev}
102+ ```
89103
90104## Remotes
91105
106+ We can add remotes but often you will just add remote via upstream when adding a branch.
107+
108+ ``` ssh
109+ got remote add ...
110+ git branch -u origin new-feature
111+ ```
112+
92113## Stashing
93114
115+ ```
116+ git stash list
117+ git stash
118+ git stash save my-name
119+ git stash apply
120+ git stash pop
121+ ```
122+
123+ * NOT USE IN A CLOUD ENV, BECAUSE YOU CAN LOST DATA
124+
94125## Merging
95126
127+ ```
128+ git checkout dev
129+ git merge main
130+ ```
131+
96132## Add
97133
98134When we want to stage changes that will be included in the commit.
You can’t perform that action at this time.
0 commit comments