## I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot). | |
## I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands | |
## came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files | |
# See the unwanted files: | |
git ls-files -ci --exclude-standard | |
# Remove the unwanted files: | |
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached | |
# Commit changes | |
git commit -am "Removed unwanted files marked in .gitignore" | |
# Push reference : https://gist.github.com/jeffjohnson9046/80bc182db7ae2f4a6150 |
For node.js Use frontail for logging https://www.npmjs.com/package/frontail For Python -- use Cutelog https://pypi.org/project/cutelog/ In NodeJs for using frontail we need to use log the logs in a file for logging logs to file , we will use winston Using winston https://www.npmjs.com/package/winston Eg. of using winstonconst { createLogger, format, transports } = require('winston'); const { combine, timestamp, label, prettyPrint } = format; const logger = createLogger({ level: 'info', format: format.json(), transports: [ // // - Write to all logs with level `info` and below to `combined.log` // - Write all logs error (and below) to `error.log`. // new transports.File({ filename: 'error.log', level: 'error' }), new transports.File({ filename: 'combined.log' }) ] }); logger.log({ level: 'info', message: 'What time is...
Comments
Post a Comment