-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.Work with branch
42 lines (42 loc) · 1.06 KB
/
1.Work with branch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$ git clone https://github.com/yarynayavor/6-vcs-advanced.git
$ cd 6-vcs-advanced
$ explorer .
$ git br architecture
$ git checkout architecture
$ touch index.html
$ mkdir assets
$ mkdir uploads
$ git st
$ git add .
$ git st
$ git ci -m "Added two folders assets/ and uploads/(have some files inside) and one index.html file with some content"
$ touch assets/all.js
$ touch assets/css.js
$ git st
$ git add .
$ git st
$ git push --set-upstream origin architecture
$ git ci -m "Added some text to uploads/aa.txt"
$ git push
$ touch .gitignore
$ git add .
$ git st
$ git ci -m "Added .gitignore to this repo"
$ git push
$ touch uploads/.gitkeep
$ git add uploads/.gitkeep
$ git ci -m "Added .gitkeep to uploads/ folder"
$ start .gitignore
// ((at .gitignore file write ` uploads/*.* ` ))
$ git rm --cached uploads/*.*
$ git st
$ touch uploads/test.txt
$ git st
$ git add .gitignore
$ git st
$ git ci -m "Ignore all files in uploads/ folder without folder due to .gitkeep file in this folder"
$ git push
$ git checkout master
$ git merge architecture
$ git br -d architecture
$ git push