git learning command record (for personal use)
Others
2020-10-28 13:50:44
views: null
git command record
Command |
Comment |
git init [directory] |
Initialize [to which directory] |
git status |
View current status |
git add . |
Add uncommitted |
git commit -m "comment information" |
Submit and add comment information |
git log [–pretty=oneline] |
View version |
git reset --head version identification |
Backtracking |
go reflog |
View historical operations |
git clone |
Clone a remote warehouse |
git pull |
Pull the online version |
git push |
Submit to online warehouse |
ssh-keygen -t rsa -C "mailbox" |
Generate sshkey |
git branch |
View branch |
git branch branch_name |
Create branch |
git checkout branch_name |
Switch branch |
git branch -d branch_name |
Delete branch |
git merge branch name to be merged |
Merge branch to local |
Ignore files
.gitignore |
/Dec/ |
Filter the entire folder |
*.zip |
Filter all zip files |
/dic/doc.txt |
Filter a specific file |
!index.php |
Do not filter a specific file |
Origin blog.csdn.net/L333333333/article/details/104086955