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"
85
85
86
86
## Branches
87
87
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
+ ```
89
103
90
104
## Remotes
91
105
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
+
92
113
## Stashing
93
114
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
+
94
125
## Merging
95
126
127
+ ```
128
+ git checkout dev
129
+ git merge main
130
+ ```
131
+
96
132
## Add
97
133
98
134
When we want to stage changes that will be included in the commit.
You can’t perform that action at this time.
0 commit comments