ACM Common algorithm template

2022-12-22   ES  

1. Git warehouse initialization: git init; 

 2. Set git's own email: git config --global ""[email protected]"; 

 3. Set git's own name: git config --global "Post-Truth"; 

 4. Current git status: git status; 

 5. Add file to Git stack: git add xxx (file name); 

 6. Remove files from git stack: git RM -Cached xxx (file name); 

 7. Add all modified files to the stack area: git add.; 

 8. If you accidentally press git commit to enter the INSERT interface: press ctul+c to save, then press: wq exit; 

 9. Submit code: git commit -m "(currently submitted version overview)"; 

 10. Terminal enter the project: vim (file name); 

 11. View the modification part of the code: git diff; 

 12. View submission log: git log; 
 13. View submission log (only one line for each submission): git log -pretty = oneLine; 

 14. After entering the project editing area, press A to edit; 

 15. Forced back to the previous version: git reset -Hard head^; 

 16. Forced back to the previous version of the previous version: Git Reset -Hard Head ^^; 

 17. View all versions of history (including rolling version number): git reflog; 

 18. Return to the version that has been returned: git reset -Hard xxxx (version number); 

 19. The code has been modified, but I have not yet entered the stack in the stack. I want to roll back to the latest version of COMMIT: git checkout xxxx (file name); 

 20. The code has been modified and the ADD entry into the stack deposit area. 
 >> 20.1 First withdrew from the stack deposit area: git restore --staged xxxx (file name); 
 >> 20.2 Repeat 19 operations: git checkout xxxx (file name); 

 21. Delete file: git restore index.php to withdraw the deleted file; 

 22. Forever delete files from the local warehouse: 
 >> 22.1 Remove files from the warehouse: git RM xxxx (file name); 
 >> 22.2 Remove from the stack area: git restore --staged xxxx (file name); 
 >> 22.3 Thoroughly removed: git RM xxxx (file name); (if it is deleted folder: git RM -R XXXX (folder name)) 
 >> 22.4 Submit modification: git commit -m "delete xxxxx"; 

 23. Generate key: ssh -keygen.exe -t RSA; (default path: $ CD C: /users/admin/.ssh) 
 >> 23.1: cat[email protected]24. From the GitHub Clone project to the local: Git Clone XXXX (address)[email protected]: Post-TRUTH/GITEE_TEST.GIT 

 25. Delete folder instructions underlinux: RM -RF XXXX (file name), 

 26. The instructions needed when uploading Gitee for the first time: (If it is not uploaded for the first time, use git push directly) 
 >> 26.1 You need to create a code warehouse on Gitee first; 
 >> 26.2 When uploading, you need to enter the warehouse website: git remote add origin xxxx (website); 
 >> 26.3 Pull: git public -reBase Origin master; 
 >> 26.4 Submit code: git push-set-upstream origin masters; 

 27. Get the current branch: git Branch 

 28. Switch local branches: git checkout -B dev Origin/Dev; 

 29. Switch the branch to master: git checkout master; 

 30. Use branches to upload projects: git push origin dev; 

 31. Delete local branches from git terminal: git branch -d dev; 

 32. Merge branch (on the master): git merge dev; 

 33. Get Gitee's latest branch data: Git Pull Origin DEV_NEW 

 34. Add the version to the version: git tag v1.0 xxxxxx (Commit number): 

 35. Display version: Git Show v0.9; 

 36. Set up the file to be uploaded: 
 >> 36.1: vim .gitignore; 
 >> 36.2: Edit .gitignore; 
 >> 36.3: Create a test file; 
 Touch q.txt; 
 Touch q.doc; 
 >> 36.4: Git Commit -M "Add Files" 
 >> 36.5: git push;


Related Posts

[Scikit -Learn Chinese Document] Streaming Learning -Supervision Learning -User Guide | Apachecnv

Install Android Studio on MacBook

shell script implementation program concurrently execute Huang Qicai The implementation principle of

javascript+CSS to achieve image rolling effect

ACM Common algorithm template

Random Posts

xcode4 use tips

[Inject] -ntmapViewOfsection

Django Rest Framework

User group management

Android’s styles.xml file and the use of theme