flycat

git

Aug 16th, 2017 (edited)
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. # https://ohshitgit.com/ru !!!
  2. # Info:
  3. git remote show origin
  4. git remote -v
  5. git remote remove origin
  6. git remote add origin <URL>
  7.  
  8. # Store passwords:
  9. git config credential.helper store
  10.  
  11. # Get only single file from remote origin
  12. git fetch
  13. git checkout origin/master -- path/to/file
  14.  
  15. # Commit
  16. git commit -m "Initial commit"
  17. git push
  18.  
  19. # Revert local changes
  20. git checkout -p <optional filename(s)>
  21.  
  22. # View branches:
  23. git branch -a
  24. git show-branch
  25.  
  26. # https://docs.moodle.org/403/en/Git_for_Administrators
  27. # Moodle update:
  28. git branch -a
  29. git branch --track MOODLE_311_STABLE origin/MOODLE_311_STABLE
  30. git checkout MOODLE_311_STABLE
  31.  
  32. git branch -avv
  33. git checkout MOODLE_500_STABLE
  34. git fetch origin
  35. git reset --hard origin/MOODLE_500_STABLE
  36. chown -R www-data *
  37.  
  38. # Moodle update (AI-version)
  39. php admin/cli/cron.php
  40. git fetch --all
  41.  
  42. php admin/cli/maintenance.php --enable
  43. git checkout -b MOODLE_311_STABLE origin/MOODLE_311_STABLE
  44. git pull
  45. php admin/cli/upgrade.php
  46. php admin/cli/maintenance.php --disable
  47.  
  48. php admin/cli/purge_caches.php
  49. # If collations error:
  50. cd admin/cli
  51. php mysql_collation.php --collation=utf8mb4_unicode_ci # check in config.php
Advertisement
Add Comment
Please, Sign In to add comment