โ ๐ปโโ๏ธ Git Cheatsheet
๐ง Move branch to commit hash
checkout master to commit hash:
git branch master hash/branch name -f
git checkout -B master hash/branch name
๐ฏโโ๏ธ Show commit changes
By default show current commit changes:
+const foo = () => {
+ return "bar";
+ }
- cosnt deletedFn = () => "deleted"
- const deletedLine = "deletedLine";
Get changes by hash/baranchName
git show hash
git show development
๐ฝ Show changes N commits back
git show HEAD~~
git show HEAD~2
git show HEAD~~~(N count)
git show HEAD~N