Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perlun/git-test
Test repo for overwriting ignored files
https://github.com/perlun/git-test
Last synced: 26 days ago
JSON representation
Test repo for overwriting ignored files
- Host: GitHub
- URL: https://github.com/perlun/git-test
- Owner: perlun
- Created: 2018-10-15T12:42:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T12:58:56.000Z (over 6 years ago)
- Last Synced: 2024-11-04T14:51:16.878Z (2 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-test
Test repo for overwriting ignored files## How to reproduce
```
$ git init
$ touch foo.txt
$ nano foo.txt
$ git add foo.txt
$ git commit -m 'Add foo.txt'
[master (root-commit) 8ef05cb] Add foo.txt
1 file changed, 1 insertion(+)
create mode 100644 foo.txt
$ git checkout -b dev
Switched to a new branch 'dev'
$ git mv foo.txt foo.bar
$ git commit -m "Rename foo.txt -> foo.bar"
[dev 4c55c9b] Rename foo.txt -> foo.bar
1 file changed, 0 insertions(+), 0 deletions(-)
rename foo.txt => foo.bar (100%)
$ echo 'my local foo.txt' > foo.txt
$ echo foo.txt > .gitignore
$ git commit -m "Add .gitignore"
[dev 4c16acb] Add .gitignore
1 file changed, 2 insertions(+)
create mode 100644 .gitignore
$ git checkout master # This will silently overwrite the local foo.txt file
```