Docker Snippets

Summary In this post, I will present some simple but useful Docker snippets. Details 1. Image Show all images. (base) zhoun14@zhoun14:~$ sudo docker images [sudo] password for zhoun14: REPOSITORY TAG IMAGE ID CREATED SIZE nanzhoumails/ubuntu-images pure-sudo-ubuntu f279d4808a3d About an hour ago 115MB Delete an image. (base) zhoun14@zhoun14:~$ sudo docker image rm nanzhoumails/ubuntu-images:pure-sudo-ubuntu Untagged: nanzhoumails/ubuntu-images:pure-sudo-ubuntu Untagged:…

Git Snippets

Summary In this post, I will introduce some useful snippets related to Git. I will update this post from time to time. Details Rename Local Branches Say you want to rename the branch old-name to new-name locally. git checkout old-name git branch -m new-name # -m: move/rename a branch and its reflog Rename Local &…