Skip to content

Commit 65368d1

Browse files
Update README.md
1 parent 6bf6710 commit 65368d1

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ gitccpy <commit-id>
4242

4343
- `<commit-id>`: The commit ID to compare against. The default value is `HEAD`.
4444

45-
## Example
45+
### New Features
46+
47+
As of the latest update, the script has the following new features:
48+
49+
- **Read All Commits**: The script reads all commit IDs from the specified commit ID to `HEAD` (including the specified commit ID itself) using the `git rev-list` command and copies all changes of all commits.
50+
- **Store Last Commit ID**: After copying files, the script stores the `HEAD` commit ID in a file named `.gitccpy.lastcommit`.
51+
- **Automatic Incremental Updates**: The next time you run the `gitccpy` command without specifying a commit ID, the script reads all commits after the stored last commit ID (excluding the last commit itself).
52+
53+
### Example
4654

4755
To copy changed files from a specific directory to the destination path, set the configuration as follows:
4856

@@ -63,7 +71,21 @@ Or using the executable:
6371
gitccpy
6472
```
6573

66-
This will copy all changed files in the `src/` directory to the `/var/www/html/` directory, preserving the folder structure.
74+
This will copy all changed files in the `src/` directory to the `/var/www/html/` directory, preserving the folder structure. After the operation, the `HEAD` commit ID will be saved in `.gitccpy.lastcommit`.
75+
76+
To copy changes based on a specific commit ID and update the last commit record:
77+
78+
```
79+
python gitccpy.py <commit-id>
80+
```
81+
82+
Or using the executable:
83+
84+
```
85+
gitccpy <commit-id>
86+
```
87+
88+
This will copy all changed files from the specified commit ID to `HEAD` and update the `.gitccpy.lastcommit` file.
6789

6890
## Conclusion
6991

0 commit comments

Comments
 (0)