10000 Merge pull request #1 from JuanBSoares/dev · ssh-juan/github-foundations@228dc57 · GitHub
[go: up one dir, main page]

Skip to content

Commit 228dc57

Browse files
authored
Merge pull request #1 from JuanBSoares/dev
Dev
2 parents 33cbf2c + 1648c0b commit 228dc57

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

git-crash-course/hello

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
branch version 2

git-crash-course/readme.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff 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

98134
When we want to stage changes that will be included in the commit.

0 commit comments

Comments
 (0)
0