File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,26 @@ Start git at a folder
18
18
git init
19
19
```
20
20
21
+ Checkout a branch
22
+ ```
23
+ git checkout <branch_name>
24
+ ```
25
+
26
+ Creating a new branch
27
+ ```
28
+ git branch -b <new_branch_name>
29
+ ```
30
+
31
+ Show all branches
32
+ ```
33
+ git branch -a
34
+ ```
35
+
36
+ Commit changes to local repository
37
+ ```
38
+ git commit -m"commit_message"
39
+ ```
40
+
21
41
### Working with Remote Repos
22
42
First we need to add a remote location.
23
43
@@ -27,6 +47,20 @@ git remote add <name> <url>
27
47
28
48
29
49
## Advanced topics
50
+ ### Ignoring files in your repository
51
+ To ignore specific files, you need to create a .gitignore by running
52
+ ```
53
+ touch .gitignore
54
+ ```
55
+
56
+ ### Cleaning generated files
57
+ Removing files that were recently created that you do not want to ever commit.
58
+ This is done in two steps:
59
+ ```
60
+ git add .
61
+ git reset --hard HEAD
62
+ ```
63
+
30
64
### Removing unwanted directories permanently
31
65
32
66
```
You can’t perform that action at this time.
0 commit comments