List all branches
git branch -v -a
Delete a branch:git branch -d local_branch_name
Force delete branch:
git branch -D local_branch_name
Create a branchgit checkout -b newbranch
git checkout commit -m "files modified"
Push origin changes to the new branch
git push origin newbranch
Connect to a remote branch:
#git checkout feature/auth0-configuration
branch 'feature/auth0-configuration' set up to track 'origin/feature/auth0-configuration'.
Switched to a new branch 'feature/auth0-configuration'
Modify the files that you want:
# git status
On branch feature/auth0-configuration
Your branch is up to date with 'origin/feature/auth0-configuration'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: frontend/Dockerfile
no changes added to commit (use "git add" and/or "git commit -a")
# git add frontend/Dockerfile
# git commit -m 'fix: Resolve docker file with env variables.'
[feature/auth0-configuration 76f71d4] fix: Resolve docker file with env variables.
1 file changed, 5 insertions(+), 10 deletions(-)
# git push origin feature/auth0-configuration
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
To delete all docker images:docker rmi -f $(docker images -aq)
No hay comentarios:
Publicar un comentario