Материал из База знаний QPAM
|
|
| Строка 1: |
Строка 1: |
| − | * Указать время в коммите: | + | * ''<Template>'': |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | #!/bin/sh | | #!/bin/sh |
| − | # 'Fri May 7 00:30:45 2021 +0300'
| + | $ ... |
| − | THE_TIME=$(date --rfc-email -d "-0 days -5 hours") GIT_AUTHOR_DATE=$THE_TIME GIT_COMMITTER_DATE=$THE_TIME git commit -m "$1"
| + | |
| − | </syntaxhighlight>
| + | |
| − | | + | |
| − | * Обновить все локальные ветки по remote-веткам
| + | |
| − | <syntaxhighlight lang="bash">
| + | |
| − | #!/bin/sh
| + | |
| − | git for-each-ref --shell --format="%(refname:short)" refs/heads | tac | tr -d "'" | while read branch_name; \
| + | |
| − | do
| + | |
| − | echo ${branch_name}
| + | |
| − | git checkout ${branch_name}
| + | |
| − | git pull
| + | |
| − | done
| + | |
| − | git checkout master
| + | |
| − | | + | |
| − | | + | |
| − | # rebase all but master:
| + | |
| − | git checkout master; git fetch origin --prune; git merge; for branch_name in $(git for-each-ref --shell --format='%(refname:short)' refs/heads | head -n -1 | tac | xargs); do git checkout ${branch_name}; git rebase master; git push origin -f; done; git checkout master
| + | |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | + | <!-- /> |
| | + | </ --/> |
Текущая версия на 15:54, 7 марта 2024