This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_git [2023/01/11 08:41] val [Создание сетевого http/ssh git репозитория] |
сервис_git [2023/05/11 13:19] val [Персонального http/ssh git репозитория] |
||
---|---|---|---|
Line 92: | Line 92: | ||
server#:/var/www/html/conf.git# chmod a+x hooks/post-update | server#:/var/www/html/conf.git# chmod a+x hooks/post-update | ||
+ | </code> | ||
Не обязательно, но, если хочется видеть содержимое текущего репозитория по http, можно поправить hooks/post-update | Не обязательно, но, если хочется видеть содержимое текущего репозитория по http, можно поправить hooks/post-update | ||
+ | <code> | ||
server#:/var/www/html/conf.git# cat hooks/post-update | server#:/var/www/html/conf.git# cat hooks/post-update | ||
</code> | </code> | ||
Line 162: | Line 162: | ||
server:~/conf$ git push origin master | server:~/conf$ git push origin master | ||
+ | |||
+ | server:~/conf$ git tag ver03 | ||
+ | |||
+ | server:~/conf$ git push origin ver03 | ||
</code> | </code> | ||
Line 209: | Line 213: | ||
===== Работа с ветками ===== | ===== Работа с ветками ===== | ||
+ | * [[https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-locally-and-remotely|How do I delete a Git branch locally and remotely?]] | ||
+ | * [[https://stackoverflow.com/questions/10312521/how-do-i-fetch-all-git-branches|How do I fetch all Git branches?]] | ||
==== Пример с тестовой веткой ==== | ==== Пример с тестовой веткой ==== | ||
<code> | <code> | ||
Line 217: | Line 223: | ||
λ git checkout test | λ git checkout test | ||
- | ... edit ... commit ... | + | ... edit ... add ... commit ... |
λ git push origin test | λ git push origin test | ||
Line 235: | Line 241: | ||
λ git push -u origin main | λ git push -u origin main | ||
+ | λ git push -u origin master | ||
... ci/cd prod ... | ... ci/cd prod ... | ||
+ | |||
+ | |||
+ | val@bro:~/conf$ git fetch --all | ||
</code> | </code> | ||