Create a new local branch from remote branch:
git checkout <new-branch>
.git checkout -b <new-branch> <existing-branch>
$ git branch -a
* feature/development_0.0.0
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/feature/development_1.0.0
remotes/origin/master
Example : I will checkout the remote branch origin/feature/development_1.0.0 to the new local branch "feature/development_1.0.0"
git checkout -b "feature/development_1.0.0" "origin/feature/development_1.0.0"
Delete a local branch :
Before deleting the branch make sure the branch is not currently checked out.
git branch -d <lOCAL-branch>
Show all the local and remote branch :
git branch -a
Add all the changes:
git add .
Git commit with message :
git commit -m "my commit message"
# Show All tags :
$ git tag
# Git Reset
$git reset --soft "49055cea321e4468e42853e47a4a6fc3bd21134a"
No comments:
Post a Comment