Notes on bash and git
# include<stdio.h>
int main() {
printf("Hello, I'm Jae. Welcome to my github page!");
}
Bash
$ echo -e "-e allows\nescaping characters"
-e allows
escaping characters
$ cat -n test.txt
ㄴ -n enumerates each line
$ bash .../target.sh
ㄴ runs inexecutable script
Gits
git log -n3 code.pyshows the last 3 commits withincode.pygit show [commit-identifier]shows the details of the commitgit revert [commit-identifier]undoes the changes made in the commit
in case of the immediate amending, use
git commit --amend
git revert HEADundoes the most recent commitgit checkout [commit-id] [file-name]also handles erroneous commitsgit blame code.py
Sometimes you have to find someone to be blamed(but not seriously) for bugs or errors.