Git
root from absolute path
git rev-parse --show-toplevel
- HOW view diff version of one file in two branch
the mybranch
is new than master:
git diff old..new
should be write master..mybranch
will be add +
after any new line
created by mybranch
(master) \$ cat file.txt
a
c
(mybranch) \$ cat file.txt
a
b
c
git diff master..mybranch -- /file1
a
+b
c
- view
diff
bitween to dirs
\$ diff -rq ./dir1 ./dir2
- git
back/reset/restor/revet
\$ git reset --hard 6bc2e3a
- diff new
file
only:
git diff --name-only --diff-filter=A 65833e30..c3098905
- submodule
git clone --recurse-submodules -j8 git://github.com/foo/bar.git
git submodule update --init --recursive