Restore and operate CentOS Git
$ Git log -- graph -- oneline $ git reset -- hard version number
Use reflog to save wrong Reset
[Jackluo @ localhost demo] $ git reflog show master | head-5
Reset
$ Git reset -- hard master @ {2}
Ls
$ Git log -- oneline
Git reflog show master | head-5
==================================
Git clean-nd Delete
Git clean-fd force Delete
Git status-s
==================================
Git stash: Save and restore the progress
Git stash list display progress list
Git stash pop resumes the latest work progress
Git stash save "message..." save the progress and specify instructions
Git stash drop deletes a storage progress
Git stash clear: Progress of deleting all storage
Git stash branch create branch based on progress
======================================
View Historical submission records
Git log -- graph -- pretty = raw refs/stash-2
Git stash apply stash @ {1} recovery progress
========================================
Git commit-a-m "is lazy and can be submitted directly using the-a parameter ."
==========================================================
Create an archive file
$ Git archive-o latest.zip HEAD
Only directories src and doc are set to partial.tar.
Git archive-o partial.tar HEAD src doc
Create an archive based on mileage v1.0 and add the directory prefix 1.0 for the archive files
$ Git archive -- format = tar -- prefix = 1.0/v1.0 | gzip> foo-1.0.tar.gz
========================================================== ===
Submitted many times from history
Git rev-list HEAD | wc-l