You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,15 @@ gitccpy <commit-id>
42
42
43
43
-`<commit-id>`: The commit ID to compare against. The default value is `HEAD`.
44
44
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
46
54
47
55
To copy changed files from a specific directory to the destination path, set the configuration as follows:
48
56
@@ -63,7 +71,21 @@ Or using the executable:
63
71
gitccpy
64
72
```
65
73
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.
0 commit comments