Last active
May 30, 2018 12:04
-
-
Save cheh/6073652 to your computer and use it in GitHub Desktop.
git: main command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Правка последнего коммита | |
git commit --amend -m "Add comment" | |
====================================== | |
Лог | |
git log --all --pretty=format:'%h %cd %s (%an)' --since='7 days ago' | |
====================================== | |
Откат до определенного коммита | |
git reset --hard sha_commit_code | |
git push --force origin | |
====================================== | |
Тэг | |
1) Delete the v0.4 tag locally: git tag -d v0.4 | |
2) Delete the v0.4 tag on GitHub (which removes its download link): git push origin :v0.4 | |
3) Add a new tag for the newest stable release: git tag -a v0.5 -m "Version 0.5 Stable" | |
4) Push the latest tag to GitHub (two dashes): git push --tags | |
====================================== | |
Клон с определенной ветки репозитория | |
git clone -b <branch> <remote_repo> | |
====================================== | |
Подготовка релиза | |
git add . | |
git commit -a -m "Version bump to 1.0.5" | |
git push | |
git checkout master | |
git pull | |
git merge develop | |
git push | |
git add . | |
git commit -a -m "UPD: readme" | |
git push | |
git tag -a v1.0.5 -m "Version 1.0.5 Stable" | |
git push --tags | |
====================================== | |
Обновление сабмодуля в репозитории | |
git submodule update --remote | |
gi add . | |
git commit -a -m "UPD: submodule" | |
git push | |
====================================== | |
Отправить локальную ветку в удаленный репозиторий | |
git push -u origin <branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment