Skip to content

Commit 23071b5

Browse files
committed
Added Caleb's modifications
1 parent dd8ba78 commit 23071b5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

handout.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@ Start git at a folder
1818
git init
1919
```
2020

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+
2141
### Working with Remote Repos
2242
First we need to add a remote location.
2343

@@ -27,6 +47,20 @@ git remote add <name> <url>
2747

2848

2949
## 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+
3064
### Removing unwanted directories permanently
3165

3266
```

0 commit comments

Comments
 (0)