Git用法总结

毫无疑问,Git是当下最流行、最好用的版本控制系统

常用功能

先放一个链接

https://blog.csdn.net/h247263402/article/details/74849182

Commitizen

http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html

非常用功能

导出diff 的文件

以下:

Below commands worked for me.

If you want difference of the files changed by the last commit:

1
git archive -o /path/to/file.zip HEAD $(git diff --name-only HEAD^)

or if you want difference between two specific commits:

1
git archive -o update.zip 4d50f1ee78bf3ab4dd8e66a1e230a64b62c49d42 $(git diff --name-only 07a698fa9e5af8d730a8c33e5b5e8eada5e0f400)

or if you have uncommitted files, remember git way is to commit everything, branches are cheap:

1
2
3
4
5
6
git stash
git checkout -b feature/new-feature
git stash apply
git add --all
git commit -m 'commit message here'
git archive -o update.zip HEAD $(git diff --name-only HEAD^)

其它

目前没有

0%