instructions
This note is not a systematic git introduction notes, only for their own rarely used, unfamiliar git command collation. Please forgive the inadequacies, welcome to correct and supplement in the comments section
notes
How to download github code
Because the network is unstable, downloading github code often fails. In this case, it is recommended to use The Github code mirroring function of Gitee to mirror the source code to China and then download it.
How to reduce the number of downloaded files
A code base that is active all year round can become very large, and some users are not interested in historical commits. It is recommended to use –depth=1 to reduce the number of files downloaded. Example git clone https://github.com/linuxdeepin/dtkcore.git — the depth = 1
What if you want to move a remote tag based on the previous step?
Git fetch origin –tag 5.4.13 –depth=1 Git checkout -b dev 5.4.13