Author SHA1 Message Date
imri 4c0a9e662b Merge pull request 'main merge to testing' (#8) from main into testing
continuous-integration/drone Build encountered an error
Reviewed-on: #8
2022-10-15 21:58:22 +02:00
imri f409dda628 golang testing 2022-10-15 21:54:22 +02:00
imri e556c12c41 Added drone CI badges
continuous-integration/drone Build is passing
2022-10-15 21:51:55 +02:00
imri d4bf242536 Added drone file 2022-10-15 21:50:46 +02:00
imri 8f217f6630 Merge pull request 'Update 'README.md'' (#5) from imri-gitignore-explain-fix2 into main
Reviewed-on: #5
2022-09-28 20:19:52 +02:00
imri c7940b5c07 Update 'README.md' 2022-09-28 20:18:57 +02:00
imri 25fc28a20b testing branch 2022-09-20 10:17:00 +02:00
3 changed files with 24 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
kind: pipeline
steps:
- name: test
image: golang
commands:
- go test
- go build
- name: publish
image: plugins/docker
settings:
repo: octocat/hello-world
tags: [ latest, 1.0, 1 ]
View File
+10 -20
View File
@@ -1,5 +1,7 @@
# This is a test
[![Build Status](http://192.168.121.12/api/badges/imri/Test/status.svg)](http://192.168.121.12/imri/Test)
## Let's do some changes here :D
@@ -35,30 +37,18 @@ git push -u origin main
```
# How do I make Git forget about a file that was tracked, but is now in .gitignore?
`.gitignore` will prevent untracked files from being added (without an `add -f`) to the set of files tracked by Git. However, Git will continue to track any files that are already being tracked.
The series of commands below will remove all of the items from the Git index (not from the working directory or local repository), and then will update the Git index, while respecting Git ignores. *PS. Index = Cache*
To stop tracking a file, we must remove it from the index:
**First:**
git rm --cached <file>
git rm -r --cached .
git add .
**Then:**
git commit -am "Remove ignored files"
---
Or as a one-liner:
```git
git rm -r --cached . && git add . && git commit -am "Remove ignored files"
```
https://stackoverflow.com/a/19095988
# Further git info
To remove a folder and all files in the folder recursively:
git rm -r --cached <folder>
The removal of the file from the head revision will happen on the next commit.
**WARNING: While this will not remove the physical file from your local machine, it will remove the files from other developers' machines on their next `git pull`.**
https://stackoverflow.com/a/1274447/1148529