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.py
shows the last 3 commits withincode.py
git 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 HEAD
undoes 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.