git status
shows tracked and untracked, added and unadded files by git
git branch -a
shows all the branches, local AND remote from the project including HEAD point
git checkout -b newBranchName
makes new branch and switch to it
-b enables to make a new branch.
without the flag, checkout does its job with existing branchName.
It moves the head point to the branch.
DELETING A BRANCH
LOCAL
git checkout -d branchName
git checkout -D branchName
-d deletes the branchName
-D option stands for --delete --force, which deletes the branch regardless of its push and merge status, so be careful using this one!!
REMOTE
git push <remoteName> --delete <branchName>
or -d for alias of delete.
checkout = an act of switching between different versions of target entities
https://www.atlassian.com/git/tutorials/using-branches/git-checkout
deleting a branch source : https://koukia.ca/delete-a-local-and-a-remote-git-branch-61df0b10d323
shows tracked and untracked, added and unadded files by git
git branch -a
shows all the branches, local AND remote from the project including HEAD point
git checkout -b newBranchName
makes new branch and switch to it
-b enables to make a new branch.
without the flag, checkout does its job with existing branchName.
It moves the head point to the branch.
DELETING A BRANCH
LOCAL
git checkout -d branchName
git checkout -D branchName
-d deletes the branchName
-D option stands for --delete --force, which deletes the branch regardless of its push and merge status, so be careful using this one!!
REMOTE
git push <remoteName> --delete <branchName>
or -d for alias of delete.
checkout = an act of switching between different versions of target entities
https://www.atlassian.com/git/tutorials/using-branches/git-checkout
deleting a branch source : https://koukia.ca/delete-a-local-and-a-remote-git-branch-61df0b10d323
댓글
댓글 쓰기