Git: Difference between revisions
Jump to navigation
Jump to search
(→Undo) |
|||
| Line 50: | Line 50: | ||
# Checkout remote branch. | # Checkout remote branch. | ||
git checkout -b static-files-3 remotes/origin/static-files-3 | git checkout -b static-files-3 remotes/origin/static-files-3 | ||
</source> | </source> | ||
https://docs.github.com/en/github/extending-github/git-automation-with-oauth-tokens | https://docs.github.com/en/github/extending-github/git-automation-with-oauth-tokens | ||
Revision as of 18:19, 8 August 2021
Configuration
git config --global core.editor "vim" git config --global user.name "name" git config --global user.email "name@mydomain.com" git config --local user.name "name" git config --local user.email "name@mydomain.com"
Maintainance
| Purpose | Command |
|---|---|
| Delete unused branches | git branch -l feature/* | xargs git branch -d |
| git branch -l feature/* | xargs git branch -D | |
| Check why a file was ignored | git check-ignore -v config.php |
Undo
# Unstage a file git reset -- src/sequelize-eparking/models/Fee.js # Latest commit > stage git reset HEAD^ git checkout upstream/develop composer.lock
Statistics
Unknown
# See local and remote branches
git branch -v -a
master c313bf9 ...
remotes/origin/static-files-2 be32085 ...
remotes/origin/static-files-3 e9021d8 ...
...
# Checkout remote branch.
git checkout -b static-files-3 remotes/origin/static-files-3
https://docs.github.com/en/github/extending-github/git-automation-with-oauth-tokens