Before, after each pull, the changed file path could be displayed
Now only the following information is displayed
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (4/4 ), done.
remote: Total 4 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
Please tell me how to set it up
to display detailed file changes after pull in the terminal
漂亮男人2017-05-02 09:31:36
git pull
命令可以解释为 git fetch
+ git merge
两步的合并体,其实在你执行 git pull
You can see the general information of the merged file.
You can use git log -p -2
to view the last two submitted records. For more details, please refer to the git official website books.
https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E6%9F%A5%E7%9C%8B%E6%8F%90 %E4%BA%A4%E5%8E%86%E5%8F%B2
If you want to compare the differences of each file submitted twice in more detail, you can use the git diff
command
git diff 查看尚未暂存的文件更新了哪些部分
git diff filename 查看尚未暂存的某个文件更新了哪些
git diff –cached 查看已经暂存起来的文件和上次提交的版本之间的差异
git diff –cached filename 查看已经暂存起来的某个文件和上次提交的版本之间的差异
git diff ffd98b291e0caa6c33575c1ef465eae661ce40c9 b8e7b00c02b95b320f14b625663fdecf2d63e74c 查看某两个版本之间的差异
git diff ffd98b291e0caa6c33575c1ef465eae661ce40c9:filename b8e7b00c02b95b320f14b625663fdecf2d63e74c:filename 查看某两个版本的某个文件之间的差异
漂亮男人2017-05-02 09:31:36
Git diff compares the differences between the files in the tracking list and the files in the file system. If you are just starting to use it, use GIT GUI. Just like tortoiseSVN, those files will be changed like this . You can use git+coding to make it more obvious. Whichever line has been modified can be directly displayed.