Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(commit): support deleting files #318

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

suzuki-shunsuke
Copy link

@suzuki-shunsuke suzuki-shunsuke commented Nov 13, 2023

Close #317

This is still work in progress.

Example 1. Create a new branch

suzuki-shunsuke/test-github-action@572e942

$ ghcp commit -r suzuki-shunsuke/test-github-action -m "try to delete file with ghcp" -b delete-file-ghcp-6 -d main.go,go.mod,go.sum
00:41:20.484313 INFO  Author and committer: suzuki-shunsuke
00:41:20.484864 INFO  Creating a branch (delete-file-ghcp-6) based on the default branch
00:41:20.749227 INFO  Created tree aefd1430f509374e66acb8a4abf8f38de2776a9c
00:41:21.202100 INFO  Created commit 572e942926124582d673373d0d13f96bd34cdfb5
00:41:21.609115 INFO  Created a commit with 3 changed file(s)
00:41:22.121244 INFO  Created a branch (delete-file-ghcp-6)

Example 2. Move a file

suzuki-shunsuke/test-github-action@0bd747e

$ ghcp commit -r suzuki-shunsuke/test-github-action -m "try to delete file with ghcp" -b delete-file-ghcp-7 main2.go -d main.go,README.md
00:44:39.244207 INFO  Author and committer: suzuki-shunsuke
00:44:39.244551 INFO  Creating a branch (delete-file-ghcp-7) based on the default branch
00:44:39.533050 INFO  Uploaded main2.go as blob 99737699383d26b6895f471a6d5991ebdfcd79fc
00:44:39.858885 INFO  Created tree 3cb356a3a887b0943ef15d8388537e7ac7828b16
00:44:40.270721 INFO  Created commit 0bd747ebbb0673d1c2aceaeb402f3d18336efb49
00:44:40.676721 INFO  Created a commit with 2 changed file(s)
00:44:41.188863 INFO  Created a branch (delete-file-ghcp-7)

Example 3. Update a branch

suzuki-shunsuke/test-github-action@0f3b315

$ ghcp commit -r suzuki-shunsuke/test-github-action -m "try to delete file with ghcp" -b delete-file-ghcp-6 -d README.md
00:47:09.978218 INFO  Author and committer: suzuki-shunsuke
00:47:09.978882 INFO  Updating the branch (delete-file-ghcp-6) by fast-forward
00:47:10.285145 INFO  Created tree 30116ec6fda19600059a1f0e762f5a38326afe92
00:47:10.696771 INFO  Created commit 0f3b315ffd9ba54c8c67af17c5b40c653f705ef7
00:47:11.103864 INFO  Created a commit with 1 changed file(s)
00:47:11.599428 INFO  Updated the branch (delete-file-ghcp-6)

@suzuki-shunsuke
Copy link
Author

TODO: Add unit tests

@suzuki-shunsuke suzuki-shunsuke marked this pull request as ready for review November 14, 2023 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support deleting or moving files
1 participant