2018-03-17 18:26:18 +05:30
|
|
|
---
|
|
|
|
comments: false
|
|
|
|
---
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
# Git Add
|
|
|
|
|
|
|
|
## Git Add
|
|
|
|
|
|
|
|
Adds content to the index or staging area.
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
- Adds a list of file:
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
```bash
|
|
|
|
git add <files>
|
|
|
|
```
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
- Adds all files including deleted ones:
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
```bash
|
|
|
|
git add -A
|
|
|
|
```
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
## Git add continued
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
- Add all text files in current dir:
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
```bash
|
|
|
|
git add *.txt
|
|
|
|
```
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
- Add all text file in the project:
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
```bash
|
|
|
|
git add "*.txt*"
|
|
|
|
```
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
- Adds all files in directory:
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
```bash
|
|
|
|
git add views/layouts/
|
|
|
|
```
|