https://github.com/technikhil314/git-diff-no-index
A simple shell script to find diff in two directories that are not git repositories themselves but they are part of some root git repository.
https://github.com/technikhil314/git-diff-no-index
Last synced: over 1 year ago
JSON representation
A simple shell script to find diff in two directories that are not git repositories themselves but they are part of some root git repository.
- Host: GitHub
- URL: https://github.com/technikhil314/git-diff-no-index
- Owner: technikhil314
- Created: 2022-06-27T10:32:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-27T10:36:49.000Z (about 4 years ago)
- Last Synced: 2025-02-12T14:57:29.542Z (over 1 year ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-diff-no-index
A simple shell script to find diff in two directories that are not git repositories themselves but they are part of some root git repository.
The script does following
1. Accepts source and target directory as inputs
2. create two directories on temp file systems
3. copies all files from source to one of temp directory by ignoring all files mentioned in root .gitignore
4. copies all files from target to one of temp directory by ignoring all files mentioned in root .gitignore
5. then runs `git diff --no-index` with those two temp directories
PS No need to delete temp directories as those are created on temp filesystem
More context here
https://twitter.com/kentcdodds/status/1541337555915997186
https://stackoverflow.com/questions/72769098/get-the-no-index-diff-of-files-in-two-directories-but-ignore-patterns