Last active
March 23, 2024 16:37
-
-
Save ciases/ac99d8fd33f92e3c9d25 to your computer and use it in GitHub Desktop.
Revisions
-
ciases revised this gist
Apr 8, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,6 @@ git diff sha1..sha2 > update.patch Add git alias to `.gitconfig`: ```txt [alias] zip-changed-files = "!f() { git diff --name-only \"$1\" \"$2\" > list.txt; zip update -@ < list.txt; rm list.txt; }; f" ``` -
ciases revised this gist
Apr 8, 2017 . 1 changed file with 20 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,18 +2,32 @@ #### Create zip archive with changed files ```bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) ``` or ```bash git diff --name-only sha1 sha2 > list.txt zip archive -@ < list.txt ``` #### Git diff between two commits ```bash git diff sha1..sha2 > update.patch ``` ## Git Alias Add git alias to `.gitconfig`: ```txt // .gitconfig [alias] zip-changed-files = "!f() { git diff --name-only \"$1\" \"$2\" > list.txt; zip update -@ < list.txt; rm list.txt; }; f" ``` Usage: ```bash $ git zip-changed-files <sha1> <sha2> ``` Note! Use bash autocomplete. Do not type insane `zip-changed-files` manually :3 -
ciases revised this gist
Jul 14, 2016 . 1 changed file with 1 addition and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,15 +12,8 @@ git diff --name-only sha1 sha2 > list.txt zip archive -@ < list.txt ```` #### Git diff between two commits ````bash git diff sha1..sha2 > update.patch ```` -
ciases revised this gist
Jul 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # GIT: zip changed files + diff #### Create zip archive with changed files -
ciases revised this gist
Jul 1, 2016 . No changes.There are no files selected for viewing
-
ciases revised this gist
Jul 1, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,4 +16,11 @@ zip archive -@ < list.txt ````bash git diff sha1..sha2 > update.patch ```` ##### Diff between two commits ````bash $ git diff sha1 sha2 > super.patch $ git apply super.patch ```` -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # GIT: zip changed files #### Create zip archive with changed files -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # GIT: zip changed files :kissing_smiling_eyes: #### Create zip archive with changed files -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # GIT: zip changed files #### Create zip archive with changed files ````bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # GIT: zip changes files #### Create zip file with changes files ````bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) @@ -12,7 +12,7 @@ git diff --name-only sha1 sha2 > list.txt zip archive -@ < list.txt ```` #### Create git diff between two commits ````bash git diff sha1..sha2 > update.patch -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # GIT: zip changes files #### Create zip file with changes files. ````bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) @@ -12,7 +12,7 @@ git diff --name-only sha1 sha2 > list.txt zip archive -@ < list.txt ```` #### Create git diff between two commits. ````bash git diff sha1..sha2 > update.patch -
ciases revised this gist
Apr 11, 2016 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,19 @@ # GIT: zip changes files 1. Create zip file with changes files. ````bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) ```` or ````bash git diff --name-only sha1 sha2 > list.txt zip archive -@ < list.txt ```` 2. Create git diff between two commits. ````bash git diff sha1..sha2 > update.patch ```` -
ciases renamed this gist
Apr 11, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,5 @@ # GIT: zip changes files ````bash git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD) ```` -
ciases renamed this gist
Mar 29, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ciases created this gist
Mar 1, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ git archive -o update.zip HEAD $(git diff --name-only <starting SHA> HEAD)