Show commit statistics
$ git log --statDisplay changes made to a file
$ git log --patch
$ git log -pIgnore whitespace when comparing lines.
$ -wDisplay most recent commit
$ git show SHASearch commits by commit message
git log --all --grep='Convert social links from text to images'Changes that have been made but haven't been committed, yet
$ git diffTag a commit
$ git tag -a betaDelete a tag
$ git tag -d betaChange Last Commit
will let you provide a new commit message
$ git commit --amend- make changes to the necessary files
- save all of the files that were modified
- use
git addto stage all of the modified files - run git
commit --amendto update the most-recent commit instead of creating a new one
Undo Changes into a New Commit
$ git revert <SHA-of-commit-to-revert>Show Detailed Log
$ git log --oneline --graph --decorate --allSync Remote Repo with Local
pushes changes to a remote
$ git pushSync Local Repo with Remote
pulls changes from a remote & merges into a local master
$ git pullIf there are commits on the repository that you don't have but there are also commits on the local repository that the remote one doesn't have either, then use
git fetchto prevent an automatic merge of the local branch with the tracking one.
Check remotes
git remote -vThe shell is a program that takes commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix-like system such as Linux. On most Linux systems a program called bash (which stands for Bourne Again SHell, an enhanced version of the original Unix shell program, sh, written by Steve Bourne) acts as the shell program.
List commands with letters "spell"
$ man -k spellFind files
first argument is where to start search
$ find ~ -name "poem*"Interesting!
catis the Linux command which means 'concatenation'.In fact, many people use
cat, rather thanmore, to display the contents of a file. However, we do not recommend usingcatin this way, since it is not nearly as useful asmore.
Send command output to a file
To send the output from a command such as
catto a file, use either>or>>.
>- overwirtes file content>>- appends to file content
Standard Input
Many commands can accept input from a facility called standard input. By default, standard input gets its contents from the keyboard, but like standard output, it can be redirected. To redirect standard input from a file instead of the keyboard, the "<" character is used like this:
$ sort < file_list.txt > sorted_file_list.txtPrint two copies of a document to the default printer
$ lpr -# 2 filenameCheck the print queue
$ lpq -P <printerName>Show Disk Space in Home Directory
$ df ~List All Running Processes
ps auxKill Process Immediately
kill -9 PIDDisplay Path to a Binary to Be Executed with a Command
type codeHonestly, I've been struggling to wrap my mind around streams, and I still am. I refuse to say I know something unless I understand all ins and outs of how something works internally.
For example, we had to use the npm
through2package, whereas I tried to solve the problems without it, alas, to no avail. I would really appreciate some more practical tasks to understand/refine my understanding of how streams work.
I also had a hard time with a couple of tasks from the Functional JS Workshop, but I enjoyed solving them. My favorite ones include
currying,trampoline, as well as bindingArray.prototype.slicetoFunction.prototype.call.in order to create a function which acts likeslice.








