기본 콘텐츠로 건너뛰기

git reflog : I love you SW engineers out there I love you git so much..

https://saraford.net/2017/03/28/how-to-recover-from-the-oh-no-i-did-a-git-reset-and-now-my-files-are-gone-087/
최근 글

Git fetch, pull, merge and reset

GIT FETCH - downloads commits, files, and refs(contents) from a remote repository into your local repo. Fetching is what you do when you want to see what everybody else has been working on. ... but it doesn't force you to actually merge the changes into your repo. Git isolates fetched content as a from existing local content, it has absolutely no effect on your local development work.Fetched content has to be explicitly checked out using the git checkout command. ...it does not update your local repo's working state, leaving your current dwor intact GIT PULL - git pull is more aggressive alternative, it will download the remote content for the active local branch and immediately execute git merge to create a merge commit for the new remote content. GIT MERGE - git merge is used to combine two branches. ...Once git finds a common base commit it will create a new "merge commit" that combines the changes of each queued merge commit sequence. -preparing to merge

When unknown command and Windows Authorization error are kicking your ass : windows

Here is what had happened. I was setting up my new work laptop. I succeeded to clone the remote repository into local. However, the previous employee who used it before me had set his windows user and somehow it seemed loads of environment variables were set to his windows user including nodejs and npm. So I reinstalled nodeJS and made sure that the installing location was set to Program files not to user Appdata. I had no problem to run npm out of his user directory, however I could not fucking run nodemon and didn't know why. After few researches, I figured out that I should have installed nodemon with global option......... npm install -g nodemon If the problem was it, I would have not write this blog post after so long time not bitting my laziness to come back here. Nevertheless of my long journey just to run nodemon instead of moving my project directory into his user file(that felt like being defeated, not sure if it was by his weird userName or myself seekin

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

https://www.codementor.io/@oparaprosper79/understanding-node-error-err_http_headers_sent-117mpk82z8 request with no body -> server should send back 400 to client request with body ->  server should send back 200 to client The request handler is simply a javascript anonymous function that takes the req& res arguments. Since this request handler has no explicit command for exiting the function in a situation a request body is not found and the error response is sent back to the client, therefore AFTER THE IF STATEMENT CONDITION has being resolved, the server tries to send ANOTHER RESPONSE to the client and here is when the error comes up Express is attempting to set the response header for this second response, hence the error message shows HOW TO FIX WHEN SENDING 400 ERR RESPONSE, SEND IT AS RETURN (reponse to a request with no body) so that the server sends the correct response and STOP the function execution as necessary.